TextEncodeKrea2SystemEditPlusAdvanced
Text, reference images, and math in the prompt
- clip
- image_inputs
- vae
- CONDITIONING
If you've ever wanted one text-encode node that handles Krea 2's system prompt, drops in reference images, and lets you do arithmetic on them inside the prompt box, this is it. TextEncodeKrea2SystemEditPlusAdvanced is the plus-size Krea 2 encoder from silveroxides' UtilsCollection: it takes a CLIP, your prompt, a system prompt, and up to a growing stack of image inputs, and returns one CONDITIONING for the sampler.
Two disclaimers up front, because both will save you a "why is this different" moment. First, it's a deprecated alias - the canonical node is the UC_-prefixed equivalent, and this class exists so workflows that already reference it keep loading. Accept ComfyUI's replacement prompt if you get it. Second, this one is a Krea-2-tuned encoder: its image placeholders and math-blending syntax are built for the Qwen3-VL-encoder generation of checkpoints, not for SDXL-era CLIP models.
How it works
Krea 2 encodes with a language model, which means your text gets wrapped in a chat-style template - system prompt first, then your description, then the assistant turn. The node builds that template for you so you don't have to hand-roll angle brackets. Images ride along two paths: a semantic path where each reference image is passed to the VLM at a chosen resolution, and a structural path where a VAE encodes reference latents that get appended to the conditioning (ref_latent_mode - single/multi append them; parallel-single/parallel-multi run them in a separate stream so they guide structure without drowning out the semantics).
What makes this variant "Plus" is the prompt syntax. The prompt field accepts inline placeholders for your image inputs, and it supports visual math blending: wrap a formula in pipes and the node blends image tensors at pixel level before encoding. The tooltip's example is the canonical one:
|((image_input_1 * 1.075) + (image_input_2 * 1.025)) / 1.5|
That takes two style/concept references, boosts each slightly, and averages them - a poor-man's style interpolation done entirely inside the prompt string. Supported operators: + - * / clamp min max abs, over image_input_1 through image_input_16.
The inputs you'll actually touch
clip- your Krea 2 CLIP (the Qwen3-VL-based one). Nothing else feeds this correctly.prompt- main text; inline placeholders and|formula|blending live here.system_prompt- injected before your user description. This is where Krea-2-style guidance like "describe the image in detail…" goes.vlm_resolution- a preset combo for the semantic path: Fast (384), Balanced (512), Detailed (768), up through XX-Large (1536) and Original. Higher = better detail, slower, more VRAM.image_inputs- autogrowing image sockets. Wire in as many as you need.vae_resolution/ref_latent_mode/vae_dimension_multiple- the structural path. Leaveref_latent_modeatoffuntil you specifically want reference-latent conditioning, because that's the setting most likely to surprise you.
The single output is CONDITIONING, wired straight into your sampler's positive input. Nothing patches the model here, so this node is cheap to iterate on - change the prompt, re-queue, no cache worries.
Install
ComfyUI Manager → search ComfyUI-UtilsCollection → install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/silveroxides/ComfyUI-UtilsCollection
Restart and you're done; the pack's only Python deps are opencv-python and typing-extensions.
When you'd reach for it
Style-mixing workflows are the sweet spot: two reference images, a |formula| blend, and a system prompt that tells the model what to keep. If you're doing heavier multi-image spatial fusion, this pack's UC_AdvancedVisualConditioningEncode family adds fusion configs and semantic anchors - but for "encode a couple of references into one conditioning without writing a custom graph," this node is hard to beat.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| clip | CLIP | — | |
| prompt | STRING | Main text prompt. Supports visual math blending: |formula| to blend image inputs at pixel-tensor level before encoding. Example: |((image_input_1 * 1.075) + (image_input_2 * 1.025)) / 1.5| to blend styles/concepts. Supported math operations: +, -, *, /, clamp, min, max, abs, on variables image_input_1 to image_input_16. | |
| system_prompt | STRING | — | |
| vlm_resolution | COMBO | Fast (384) | Resolution of the image passed to the VLM (semantic path). 'Fast' = 384x384, 'Balanced' = 512x512, 'Detailed' = 768x768, 'Large' = 1024x1024, 'X-Large' = 1280x1280, 'XX-Large' = 1536x1536, 'Original' uses native resolution. |
| 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. |
| vae_dimension_multiple | INT | 84–256 | Pixel multiple used to align reference images before VAE encoding. |
| image_inputs | COMFY_AUTOGROW_V3 | — | |
| vaeopt | VAE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| CONDITIONING | CONDITIONING | — |