Nodes/ComfyUI-UtilsCollection/Advanced Visual Conditioning Encode
ComfyUI Node

Advanced Visual Conditioning Encode

The advanced visual encoder that turns 'encode these images' into a toolbox

By silveroxides·Created 2 months ago·Updated about 7 hours ago· 24
Advanced Visual Conditioning Encode
  • clip
  • image_inputs
  • visual_fusion_config
  • vae
  • CONDITIONING
prompt
system_prompt
vlm_resolution384
formula
padding_methodzero-pad
vae_resolutionFast (1024)
ref_latent_modeoff
multiplier1.0
vae_dimension_multiple8
semantic_anchorfalse

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) - a UC_VisualFusionConfig object 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 or off, the node falls back to numbered inline placeholders and the formula/padding_method controls.
  • formula - used only with fusion off and no numbered placeholders; empty means "use the first image pass."
  • padding_method - zero-pad or interpolate, 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's parallel-single/parallel-multi modes 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.

Categoryadvanced/conditioning

Inputs (14)

NameTypeDefaultDescription
clipCLIPCLIP/T5 dual text encoder reference.
promptSTRINGMain 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_promptSTRINGSystem prompt injected prior to user description.
vlm_resolutionINT3840–4096Equivalent-square VLM target from 256 to 3584. Values outside that range preserve original resolution.
formulaSTRINGOptional formula used only with fusion off when no numbered inline placeholders are present. Empty selects the first image pass.
padding_methodCOMBOzero-padAlignment method for images with different aspect ratios/resolutions. Active ONLY if visual_fusion_config is disconnected or set to 'off'.
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.
multiplierFLOAT1.0-1000–1000Overall multiplier applied to the final conditioning vector.
vae_dimension_multipleINT84–256Pixel multiple used to align reference images before VAE encoding.
semantic_anchorBOOLEANfalsePrefixes each encoded visual slot with its numbered <Picture N>: semantic anchor.
image_inputsCOMFY_AUTOGROW_V3Multimodal images. Maps active inputs sequentially to variables (a, b, c, ...).
visual_fusion_configoptVISUAL_FUSION_CONFIGOptional spatial visual fusion configuration from UC_VisualFusionConfig. Blends isolated visual blocks without coordinate blur.
vaeoptVAE

Outputs (1)

NameTypeDescription
CONDITIONINGCONDITIONING