Vantage Text Encode (Krea2)
Encode prompts for Krea 2 — with reference-image fusion and a prompt-adherence booster
- clip
- model
- images
- masks
- MODEL
- CONDITIONING
Krea 2 is a 12B image model that got a lot of "finally, prompt adherence that doesn't fight you" goodwill when its weights opened, and this node is the ComfyUI-side text encoder for it. It's not a plain CLIP encode: it patches the Krea 2 model with an optional prompt-adherence enhancer, can fuse reference images (and masks) into the conditioning, and lets you rebalance the conditioning per layer - all of it influenced by ideas from the ComfyUI-Krea2T-Enhancer, Conditioning-Rebalance, and Krea2TextEncoder projects the pack credits.
The two knobs are the whole personality of this node, so let's be honest about what they do.
The reference-image fusion
Connect images (an IMAGE batch) and optionally masks, and your prompt text gets fused with Qwen3-VL vision tokens before Krea 2 conditioning is encoded. That's your "show the model what you mean" path - style reference, composition reference, character reference, all mixed with the text prompt. Two controls shape it:
- vision_megapixels (default 1) - the cap for each reference image before the vision encoder. Bigger images get downscaled to this budget; smaller ones stay native. This is your VRAM/quality dial for vision fusion.
- mask_padding (default 0) - when a mask is connected, each image crops to its masked region before encoding.
0is a tight crop;0.1keeps ~10% surrounding context on each side. For "just this object in the frame" references, a little padding reads better. - system_prompt - optional override for how the VLM interprets the reference images together with your prompt. Leave it unconnected to use Krea 2's trained descriptor; if you override, give only the instruction text - the node adds the chat-template scaffolding itself.
The two boosters
- conditioning_rescaling (default on) with multiplier (default 4) and per_layer_weights - scales the encoded conditioning tensor by a global multiplier plus per-layer gains for the 12 Krea 2/Qwen3-VL tap layers. The default weight string (
1.0,1.0,1.0,1.0,1.0,1.0,1.0,2.5,5.0,1.1,4.0,1.0) is a tuned profile; the big bumps on the later layers are doing the heavy lifting. Turn rescaling off to pass raw conditioning through untouched. This is where the Conditioning-Rebalance DNA lives. - prompt_adherence_enhancer (default on) with strength (default 1) - wraps the model so the txtfusion behavior during sampling gets boosted to strengthen prompt following.
0disables it,1applies the full profile. If Krea 2 feels like it's drifting from your prompt, this is the switch to test first.
Outputs are MODEL (the patched model - run it into your sampler) and CONDITIONING (feed it to the sampler's conditioning input). clip is the CLIP/text-encoder object that does the tokenizing and encoding.
Install
Part of Vantage-Nodes:
cd ComfyUI/custom_nodes
git clone https://github.com/vantagewithai/Vantage-Nodes.git
pip install -r requirements.txt
or ComfyUI Manager → search "Vantage-Nodes" → Install → restart. You need a Krea 2 model and its matching text encoder/CLIP from elsewhere - this node doesn't download them; it encodes with what you connect.
Common issues
- "Why does my prompt do nothing?" - check
prompt_adherence_enhancerandconditioning_rescalingare on (they default on, but a saved workflow may have flipped them). Then confirm the clip is actually Krea 2's text encoder, not a generic CLIP. - Vision fusion eats VRAM - lower
vision_megapixels. The vision encoder budget is the main lever. - Reference crops too tight - raise
mask_padding. A tight crop loses context; the fractional padding exists exactly for this.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| clip | CLIP | CLIP/text-encoder object used to tokenize and encode the prompt for Krea2. | |
| model | MODEL | Krea2 model to patch with the optional prompt-adherence enhancer and return downstream. | |
| prompt | STRING | Main text prompt. If reference images are connected, this text is fused with vision tokens before Krea2 conditioning is encoded. | |
| vision_megapixels | FLOAT | 1.00.1–8 | Maximum allowed size in megapixels for each reference image before the Qwen3-VL vision encoder. Larger images are downscaled; smaller ones are kept at native size and never upscaled. |
| mask_padding | FLOAT | 0.000–1 | Extra context kept around each mask before cropping, expressed as a fraction of image size added on each side. 0 makes a tight crop; 0.1 keeps about 10% surrounding context. |
| conditioning_rescaling | BOOLEAN | true | Enables conditioning rescaling with multiplier and optional per-layer weights. Disable to pass the raw encoded conditioning through unchanged. |
| multiplier | FLOAT | 4.00-1000000000–1000000000 | Global multiplier applied to the final conditioning tensor when conditioning_rescaling is enabled. |
| per_layer_weights | STRING | 1.0,1.0,1.0,1.0,1.0,1.0,1.0,2.5,5.0,1.1,4.0,1.0 | Comma-separated per-layer gains for the 12 Krea2/Qwen3-VL tap layers. Leave as default for the tuned profile, or edit to rebalance specific layers before the global multiplier is applied. |
| prompt_adherence_enhancer | BOOLEAN | true | Enables the Krea2 prompt-adherence enhancer wrapper on the model. This adjusts txtfusion behavior during sampling to strengthen prompt following. |
| strength | FLOAT | 1.000–1 | Strength of the prompt-adherence enhancer. 0 disables the enhancer effect; 1 applies the full tuned profile. |
| system_promptopt | STRING | Optional system-instruction override for how the VLM interprets the reference image together with your prompt. Leave unconnected to use Krea2's trained descriptor. Provide only the instruction text; the node adds the chat-template scaffolding automatically. | |
| imagesopt | IMAGE | Optional reference image batch. Each image is converted into Qwen3-VL vision tokens and fused with the text prompt for Krea2 conditioning. | |
| masksopt | MASK | Optional mask batch aligned to the reference images. Each mask crops its corresponding image to the masked region before vision encoding; empty masks leave the full image unchanged. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |
| CONDITIONING | CONDITIONING | — |