Advanced Visual Conditioning Encode
The advanced visual encoder that turns 'encode these images' into a toolbox
- clip
- image_inputs
- visual_fusion_config
- vae
- CONDITIONING
The simple encoder nodes in this pack take a prompt and some images and return conditioning - job done. UC_AdvancedVisualConditioningEncode is the power-tool version: it does the same thing but adds a fusion config, a resolution dial, a formula field, padding control, reference-latent modes, and per-image semantic anchors. If you're encoding two or three reference images into a Krea 2 / Qwen3-VL-style workflow and the simple encoder isn't giving you the control you want, this is the node to graduate to.
Marked experimental in the source, which is the pack's honest way of saying "this is where the interesting knobs live, and they're knobs."
What it does
Inputs: clip, prompt, system_prompt, vlm_resolution (256–3584 in 32-pixel steps, default 384), then the parts that make it "advanced":
visual_fusion_config(optional) - aUC_VisualFusionConfigobject that blends isolated visual blocks spatially, without the coordinate blur you'd get from pasting images together. Connected and active, it becomes the primary routing path; disconnected oroff, the node falls back to numbered inline placeholders and theformula/padding_methodcontrols.formula- used only with fusion off and no numbered placeholders; empty means "use the first image pass."padding_method-zero-padorinterpolate, for aligning mixed-aspect-ratio images (only active when fusion is off).vae_resolution/ref_latent_mode/vae_dimension_multiple/vae- the structural reference-latent path.ref_latent_mode'sparallel-single/parallel-multimodes keep reference latents in a separate conditioning stream so they guide structure without overriding semantics.multiplier- global scale on the final conditioning vector; the tooltip calls it "overall multiplier applied to the final conditioning vector," and it's the cheapest way to push or damp prompt adherence.semantic_anchor- prefix each encoded visual slot with<Picture N>so your prompt can say "the jacket in Picture 2" and have it mean something.image_inputs- autogrowing image sockets, mapped sequentially to variables.
Output is a single CONDITIONING. No model patching, so it's cheap to iterate.
The prompt contract is worth internalizing because it's the same across this family: with fusion off, image_input_N places image N inline; with fusion on, use image_input_fusion (and image_input_1 is accepted as an alias for it). Getting those two confused is the classic first error.
Install
ComfyUI Manager → search ComfyUI-UtilsCollection → install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/silveroxides/ComfyUI-UtilsCollection
Restart. Deps: opencv-python and typing-extensions.
When you'd reach for it
Multi-reference style work where the simple encoders don't give you enough grip - you want spatial fusion and semantic anchors and a resolution dial in one node. The TokenFusion variant (UC_AdvancedVisualConditioningEncodeTokenFusion) is the sibling to know about if you'd rather fuse tokens before encoding; same schema, different fusion philosophy. And note the Krea 2 legacy alias TextEncodeKrea2SystemEditScaledAdv is this node under its old name.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| clip | CLIP | CLIP/T5 dual text encoder reference. | |
| prompt | STRING | Main prompt. With fusion off, image_input_N places active image N inline. With fusion on, use image_input_fusion (image_input_1 is accepted as an alias). | |
| system_prompt | STRING | System prompt injected prior to user description. | |
| vlm_resolution | INT | 3840–4096 | Equivalent-square VLM target from 256 to 3584. Values outside that range preserve original resolution. |
| formula | STRING | Optional formula used only with fusion off when no numbered inline placeholders are present. 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. |
| semantic_anchor | BOOLEAN | false | Prefixes each encoded visual slot with its numbered <Picture N>: semantic anchor. |
| 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 (1)
| Name | Type | Description |
|---|---|---|
| CONDITIONING | CONDITIONING | — |