Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > Text Encode (Krea2)

ComfyUI Extension: Text Encode (Krea2)

Repo Name

ComfyUI-Krea2TextEncoder

Author
ethanfel (Account age: 3465 days)
Nodes
View all nodes(1)
Latest Updated
2026-06-27
Github Stars
0.13K

How to Install Text Encode (Krea2)

Install this extension via the ComfyUI Manager by searching for Text Encode (Krea2)
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter Text Encode (Krea2) in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Text Encode (Krea2) Description

Text Encode (Krea2) turns prompts and optional reference images into conditioning for Krea2 image generation. Masks focus attention on selected reference areas; images guide the result, not pixel-level edits.

ComfyUI-Krea2TextEncoder Introduction

Text Encode (Krea2)

ComfyUI-Krea2TextEncoder provides the Text Encode (Krea2) node for creating prompt conditioning for the Krea2 / K2 image model (kreaturbo.safetensors). Alongside your written prompt, you can provide reference images so the model’s text encoder can take visual details into account.

This can be useful when you want a generated image to draw inspiration from a reference’s colors, shapes, textures, objects, or background. The node also supports an optional mask for each reference image, letting you focus its attention on a particular part of the image.

The author created this node to address two confusing behaviors when using ComfyUI’s TextEncodeQwenImageEdit node with Krea2: its VAE input does not give Krea2 a usable reference image for pixel-faithful editing, and attaching an image changes the prompt format away from the descriptor format used for Krea2. Text Encode (Krea2) keeps that descriptor format when images are connected and does not offer a VAE input that Krea2 would ignore.

How ComfyUI-Krea2TextEncoder Works

Think of the node as preparing a brief for Krea2. Your prompt supplies the written direction, while any connected reference images provide visual information. The node passes both through Krea2’s Qwen3-VL-4B text encoder and outputs conditioning for the Krea2 sampler.

A reference image is visual guidance, not an editable canvas. Krea2 can use information the encoder draws from the image, but this node cannot make the model copy pixels faithfully or replace a specific area of an existing image. Krea2 does not have the reference-latent pathway that would make that kind of editing possible through this node.

If you connect a mask, the node first crops the corresponding reference image around the mask’s bounding box. The vision encoder then sees that crop, rather than the mask itself. For example, masking a vase on a table directs attention toward the vase; adding padding can keep some of the table visible for context. This does not inpaint the output or tell Krea2 where to place the vase in the generated image.

You can also use the node without any images. In that case, it acts as a plain Krea2 text encoder.

ComfyUI-Krea2TextEncoder Features

Reference images and optional masks

Connect an image to image1 to add a visual reference. As you connect images, the node grows to offer another image and mask pair, so you can use multiple references. Each maskN applies to its matching imageN.

A mask crops the input reference to the masked region before encoding. Use mask_padding to control how much of the surrounding image stays in view:

  • 0 (the default) makes a tight crop around the mask.
  • 0.1 adds a margin of approximately 10% of the image size on each side.
  • Higher values retain more context; sufficiently high values can bring nearly the whole image back into view.

If you instead want to restrict where conditioning applies in the generated output, you can place ComfyUI’s standard ConditioningSetMask downstream of this node. That is separate from reference-image cropping and is not an inpainting feature.

Prompt and system instruction

Enter your image idea in prompt. Leave system_prompt unconnected to use Krea2’s default descriptor instruction—the format the model was trained with. This is the recommended starting point when comparing results.

For a different approach, connect a text node to system_prompt. The extension includes a Krea2 System Prompt node with an editable instruction that asks the encoder to describe the reference and consider how your request should combine with or alter it. This can encourage more interaction between your prompt and the reference, but it is experimental: Krea2 was trained with the fixed descriptor instruction, so results may drift. Try the same workflow with and without the override to see which works better for your image.

Provide only the instruction text to system_prompt; the node adds the required prompt formatting.

Other controls and output

ControlWhat it does
clipAccepts the encoder loaded with CLIPLoader → type krea2.
vision_positionPlaces image information before prompt (default) or after prompt in the user message. Try both if the relationship between your text and reference is not coming through as you expect.
vision_megapixelsCaps reference-image size before vision encoding. The default is 1.0 megapixel. Images above the cap are downscaled; smaller images are never upscaled by this setting.
print_promptPrints the assembled Qwen3-VL prompt to the ComfyUI console for debugging. It does not create an image preview.

The node outputs standard conditioning for the Krea2 sampler.

ComfyUI-Krea2TextEncoder Models

This extension is designed for the Krea2 / K2 model (kreaturbo.safetensors). Its text encoder is Qwen3-VL-4B, which can process both text and visual information. The extension does not provide a selection of alternative image-generation models.

Use CLIPLoader with type krea2 for the node’s clip input. The included Krea2 System Prompt is a prompt helper, not another model.

Troubleshooting ComfyUI-Krea2TextEncoder

My reference image does not appear to be copied or edited precisely.

  1. Treat the image as visual guidance rather than a source of pixels to preserve exactly.
  2. Describe the details you want in prompt, and compare the result with Krea2’s default descriptor instruction.
  3. If you want the prompt to explicitly build on or alter the reference, try the Krea2 System Prompt node and compare results.

This node cannot add pixel-faithful reference editing to Krea2.

My mask is not filling or changing a region in the output.

  1. Check that maskN is paired with the intended imageN.
  2. Remember that the mask only chooses what part of the reference image the vision encoder sees.
  3. Adjust mask_padding if the crop needs more surrounding context.

For spatial control over where conditioning applies in the output, use ConditioningSetMask downstream. Reference-image masks are not inpainting masks.

My reference seems to have too little context.

Increase mask_padding from its default of 0. This widens the crop around the selected area, which can help retain nearby objects or background details.

My prompt and reference do not seem to interact.

Start with the default system_prompt setting, then connect Krea2 System Prompt and compare. Its instruction explicitly asks how your written request should combine with the reference. Because this override is experimental for Krea2, the default may still produce a better result. You can also compare the two vision_position options.

Can I use the node without a reference image?

Yes. Leave the image inputs unconnected, and it produces plain Krea2 text conditioning.

What does print_prompt show?

It prints the assembled prompt in the ComfyUI console. Turn it on when you want to inspect the text sent for encoding; it does not display a screenshot or image in the workflow.

Text Encode (Krea2) Related Nodes

RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

Text Encode (Krea2) detailed guide | ComfyUI