Nodes/ComfyUI-UtilsCollection/TextEncodeKrea2SystemEditPlusAdvanced
ComfyUI Node

TextEncodeKrea2SystemEditPlusAdvanced

Text, reference images, and math in the prompt

By silveroxides·Created 2 months ago·Updated about 7 hours ago· 24
TextEncodeKrea2SystemEditPlusAdvanced
  • clip
  • image_inputs
  • vae
  • CONDITIONING
prompt
system_prompt
vlm_resolutionFast (384)
vae_resolutionFast (1024)
ref_latent_modeoff
vae_dimension_multiple8

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. Leave ref_latent_mode at off until 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.

Categorymodel/conditioning

Inputs (9)

NameTypeDefaultDescription
clipCLIP
promptSTRINGMain 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_promptSTRING
vlm_resolutionCOMBOFast (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_resolutionCOMBOFast (1024)Resolution of the reference latent encoded by the VAE (structural path).
ref_latent_modeCOMBOoffReference latent encoding mode. 'single'/'multi' append latents; 'parallel-single'/'parallel-multi' run them in a separate conditioning stream to prevent semantic override.
vae_dimension_multipleINT84–256Pixel multiple used to align reference images before VAE encoding.
image_inputsCOMFY_AUTOGROW_V3
vaeoptVAE

Outputs (1)

NameTypeDescription
CONDITIONINGCONDITIONING