Krea2 Token Attention Weight (TokenFusion)
Krea 2 attention weighting after token-first visual fusion
- model
- clip
- image_inputs
- visual_fusion_config
- vae
- MODEL
- CONDITIONING
This is the TokenFusion variant of UC_Krea2TokenAttentionWeight, and the difference matters mostly when you're fusing multiple reference images into one conditioning stream. The plain node patches attention and encodes in one pass. This one does the fusion first - merging the per-source visual tokens into a single sequence at the token level - then runs one shared conditioning encode, then applies your phrase-level attention weights on top.
Same promise, slightly different pipeline: (arms:1.5) (painting:0) (photo:2) style attention odds for Krea 2, but arranged for workflows where several images need to be blended into a single coherent visual context before the text weighting is applied. If you're building multi-image setups - a character sheet, a scene reference plus a style reference - the TokenFusion version is the one that matches how you're already thinking about the data.
How it works
The input surface is essentially identical to the plain node: a Krea 2 model, the clip (Qwen3-VL text encoder), prompt, system_prompt, attention_weights (space-separated (phrase:odds) pairs), vlm_resolution, strength (the global multiplier that compounds over all attention blocks), plus the fallback stack of formula / padding_method / vae_resolution / ref_latent_mode / multiplier / vae_dimension_multiple, and the autogrowing image_inputs.
The architectural difference is what the display name says: token fusion happens before the single encode. Instead of encoding each visual source and stitching the conditionings together downstream, the node fuses the visual tokens per-source into one interleaved sequence, runs one shared conditioning encode, and then applies the attention weighting. That's one less encode pass and, more importantly, the visual and text tokens share a single conditioning context when the weights land.
Outputs: the patched MODEL and the resulting CONDITIONING - same wiring as its sibling. As with the plain node, fusion accepts image_input_fusion or image_input_1 for its single visual slot, and numbered multi-image inline placement is deliberately unavailable.
Which one should you use?
If you're doing single-image Krea 2 work, take the plain UC_Krea2TokenAttentionWeight - fewer moving parts, same weighting. If you're fusing multiple references, this one. One thing to check when you load a workflow: this pack actively registers node replacements, so older graphs may auto-migrate to these canonical IDs - if a workflow references the older TextEncodeKrea2SysEditScaledAdvAttn style names, ComfyUI should offer to upgrade them when the pack is installed.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/silveroxides/ComfyUI-UtilsCollection
Restart (or ComfyUI Manager → search "ComfyUI-UtilsCollection"). You need the Krea 2 model stack - checkpoint, Qwen3-VL text encoder (~8GB), Qwen-Image VAE - and the pack's own dependencies are just opencv-python and typing-extensions. Multi-image fusion plus a patched model is heavier on VRAM than the single-image path, so if you're on 16GB, keep vlm_resolution at the Fast setting and test with one image before piling on references.
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 | — |