Krea2 System Prompt Scaled Attention Encoder (Advanced)
Reweight what Krea 2 actually looks at, word by word
- model
- clip
- image_inputs
- visual_fusion_config
- vae
- MODEL
- CONDITIONING
Krea 2 is the 12B DiT that opened in June 2026 with a Qwen3-VL text encoder instead of CLIP, and that one architectural swap quietly breaks an old habit. On SD/SDXL you emphasized a word with (word:1.4) and the tokenizer scaled it up. On an LLM encoder there is no such per-token emphasis knob - so the trick moved down a level, into attention itself. That's what this node does. It patches the diffusion model so specific words in your prompt get more (or less) attention during sampling, then hands you back the patched model and the conditioning to feed it.
The name is a mouthful, and the first thing to know is that it's a deprecated alias - the pack registers this class for old-workflow compatibility while the canonical node lives on as UC_Krea2TokenAttentionWeight. If ComfyUI offers to replace it with the UC_ version, take the offer. Same behavior, no legacy cruft.
What it actually does
Two outputs tell you it's doing two jobs at once. The MODEL output is a patched clone of your diffusion model with attention monkeypatched per the weights string; the CONDITIONING output is the normal text-encode result. You wire both into the same KSampler branch - patched model in, conditioning in - and the sampling run reweights which visual blocks the model attends to.
The input that matters most is attention_weights. It's a plain space-separated list of non-negative "odds" weights, and the author's own example is the best tutorial there is:
(arms:1.5) (painting:0) (photo:2)
That means: pay a little extra attention to arms, roughly zero attention to painting, and double down on photo. Values are odds, so 0 actively suppresses a concept rather than merely underweighting it. strength (default 1, range 0–4) is a global multiplier that compounds across all blocks - push it when a single word isn't biting.
Everything else is the pack's standard visual-conditioning stack: clip and prompt plus a system_prompt injected before your description, image_inputs for reference images, vlm_resolution to size the images for the semantic path (256–3584, outside that range it keeps the original resolution), and vae_resolution/ref_latent_mode for the structural VAE-reference path. Optional visual_fusion_config (from UC_VisualFusionConfig) blends isolated visual blocks spatially. One honest quirk the tooltip flags: numbered multi-image inline placement like <Picture N> is intentionally unavailable here - that's the price of attention-level control.
Install
Grab the pack via ComfyUI Manager (search ComfyUI-UtilsCollection) or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/silveroxides/ComfyUI-UtilsCollection
Then restart ComfyUI. Dependencies are just opencv-python and typing-extensions - nothing exotic.
When you'd reach for it
This is the node for the stubborn-case fight: Krea 2 keeps painting a jacket when you said no jacket, or a style tag keeps swamping your subject. It's fiddly - you're tuning by eye, and weights that work at one seed won't perfectly transfer to another. Start with one suppressed word at 0 and one boosted word at 1.5–2, leave strength at 1, and only stack more entries once you know what direction each one pushes. And since you're monkeypatching the model, cache-bust: any change to the weights string is a new patched model on the next queue. It's a scalpel, not a hammer - but it's a scalpel nothing else in the pack comes close to.
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | Diffusion model to apply the attention monkeypatch to. | |
| clip | CLIP | CLIP/T5 dual text encoder reference. | |
| prompt | STRING | Main prompt. Fusion accepts image_input_fusion or image_input_1 for its single visual slot. Numbered multi-image inline placement is intentionally unavailable in this attention node. | |
| system_prompt | STRING | System prompt injected prior to user description. | |
| attention_weights | STRING | Space-separated non-negative attention odds weights. Example: (arms:1.5) (painting:0) (photo:2) | |
| vlm_resolution | INT | 3840–4096 | Equivalent-square VLM target from 256 to 3584. Values outside that range preserve original resolution. |
| strength | FLOAT | 1.000–4 | Global multiplier on the weighting effect. Effect compounds over all blocks. |
| formula | STRING | Optional conditioning formula used only when visual fusion is off. Empty selects the first image pass. | |
| padding_method | COMBO | zero-pad | Alignment method for images with different aspect ratios/resolutions. Active ONLY if visual_fusion_config is disconnected or set to 'off'. |
| vae_resolution | COMBO | Fast (1024) | Resolution of the reference latent encoded by the VAE (structural path). |
| ref_latent_mode | COMBO | off | Reference latent encoding mode. 'single'/'multi' append latents; 'parallel-single'/'parallel-multi' run them in a separate conditioning stream to prevent semantic override. |
| multiplier | FLOAT | 1.0-1000–1000 | Overall multiplier applied to the final conditioning vector. |
| vae_dimension_multiple | INT | 84–256 | Pixel multiple used to align reference images before VAE encoding. |
| image_inputs | COMFY_AUTOGROW_V3 | Multimodal images. Maps active inputs sequentially to variables (a, b, c, ...). | |
| visual_fusion_configopt | VISUAL_FUSION_CONFIG | Optional spatial visual fusion configuration from UC_VisualFusionConfig. Blends isolated visual blocks without coordinate blur. | |
| vaeopt | VAE | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |
| CONDITIONING | CONDITIONING | — |