Nodes/ComfyUI-UtilsCollection/Advanced Visual Consensus Encoder
ComfyUI Node

Advanced Visual Consensus Encoder

Fuse your reference images spatially, then let a vote settle the resolution

By silveroxides·Created 2 months ago·Updated about 7 hours ago· 24
Advanced Visual Consensus Encoder
  • clip
  • visual_consensus_config
  • image_inputs
  • vae
  • CONDITIONING
prompt
system_prompt
vlm_resolution384
vae_resolutionFast (1024)
ref_latent_modeoff
multiplier1.0
vae_dimension_multiple8
semantic_anchorfalse

If you've hit the multi-reference wall - three style images that keep fighting each other, or conditioning that collapses when you feed a batch of frames - the problem is usually that a single encode has to pick one winner. The pack's answer to that is consensus conditioning, and UC_AdvancedVisConEncoder ("Advanced Visual Consensus Encoder") is the heavyweight implementation. It runs two stages in sequence: it spatially fuses your visual sources into a complete conditioning at each encoder resolution, then passes those complete conditionings through the same consensus math that powers UC_ConditioningConsensusBlend so outlying resolution samples get rejected instead of averaged in. The result is one CONDITIONING that's far more stable than any single encode.

Marked is_experimental in the source - this is the pack's R&D corner, so expect to tune rather than plug-and-play.

How it works

The README is refreshingly precise about the architecture: the node constructs a complete, spatially fused conditioning independently at every selected VLM resolution, then consensus-blends those complete conditionings across resolutions. Spatial fusion and consensus are not alternatives and are never crossfaded - they're sequential stages. Each stage can be disabled from its own config: fusion method off kills the spatial stage, consensus preset off kills the cross-resolution stage. Both are off and you've built a fancier way to do a normal encode.

Inputs: clip, prompt, system_prompt, vlm_resolution (equivalent-square target, 256–3584, default 384), a required visual_consensus_config (from UC_VisualConsensusConfiguration, which itself combines a UC_VisualFusionConfig with a UC_AdvancedConsensusConfiguration), the standard vae_resolution/ref_latent_mode/multiplier/vae_dimension_multiple/semantic_anchor stack, and image_inputs.

The image_inputs routing deserves a careful read because it's the part that bites:

  • One batched socket behaves like its images were connected as separate visual sources.
  • Multiple batched sockets form index-aligned lanes - index 0 of each socket is one visual source.
  • Singleton sockets broadcast to every lane.
  • All other batch lengths must match.

That's the contract for feeding "these four images are four sources" versus "this one image applies to all sources."

The AdvancedConsensusConfig's resolution_samples and sample_offset drive the resolution sampling (how many neighboring resolutions, how far apart), and semantic_anchor prefixes each slot with <Picture N> so the model can address images by number. Note the ref_latent_mode tooltip: MiniMax H3 requires off here and uses Core's dedicated H3 reference conditioning instead.

Install

ComfyUI Manager → search ComfyUI-UtilsCollection → install, or:

cd ComfyUI/custom_nodes
git clone https://github.com/silveroxides/ComfyUI-UtilsCollection

Restart. Deps are opencv-python and typing-extensions.

When you'd reach for it

Multi-reference, batch-driven, or resolution-sensitive conditioning - especially for video where a whole batch of frames has to agree on one semantic direction. The TokenFusion sibling is the alternative to know about: it fuses tokens before encoding rather than fusing the completed conditioning, and the README says explicitly they're different philosophies (spatial-first vs additive token-first). Start with this one if you want the proven spatial path.

Categoryadvanced/conditioning

Inputs (12)

NameTypeDefaultDescription
clipCLIPCLIP/T5 dual text encoder reference.
promptSTRING
system_promptSTRING
vlm_resolutionINT3840–4096Equivalent-square VLM target. Values outside 256-3584 preserve Original resolution.
visual_consensus_configVISUAL_CONSENSUS_CONFIGRequired joint configuration. Spatial fusion completes independently at every resolution before complete-conditioning consensus.
vae_resolutionCOMBOFast (1024)6 options: Ultra (512), Turbo (768), Fast (1024), Balanced (1280), Detailed (1536), Original
ref_latent_modeCOMBOoffGeneric reference-latent mode. MiniMax H3 requires off and uses Core's dedicated H3 reference conditioning instead.
multiplierFLOAT1.0-1000–1000
vae_dimension_multipleINT84–256
semantic_anchorBOOLEANfalsePrefixes each encoded visual slot with its numbered <Picture N>: semantic anchor.
image_inputsCOMFY_AUTOGROW_V3One batched socket equals separate visual sources. Multiple batched sockets form index-aligned lanes; singleton sockets broadcast.
vaeoptVAE

Outputs (1)

NameTypeDescription
CONDITIONINGCONDITIONING