Nodes/ComfyUI/Edit Model Reference Method
ComfyUI Node Runs on cloud

Edit Model Reference Method

The obscure switch that fixes broken multi-reference edits

By Comfy-Org·Created 4 years ago·Updated 27 days ago· 121,575
Edit Model Reference Method
  • conditioning
  • CONDITIONING
reference_latents_method

This is one of those nodes you will almost certainly never add to a workflow on purpose, and that's exactly why it's worth knowing about. It's marked experimental in the source, it has exactly two inputs, and its entire job is to stamp a tiny flag onto a CONDITIONING object telling the sampler how the reference-image latents in that conditioning are arranged relative to the text tokens. If that flag is wrong, a multi-reference edit model will put your character's features in the wrong place, blend references together, or just ignore half of what you fed it. If it's right, you'll never think about it again.

What it does

The node sits in the "model/conditioning/flux" category but it isn't Flux-specific - it shows up in Flux Kontext and Qwen-Image-Edit workflows alike, anywhere an edit model consumes several reference images as latents. You hand it a conditioning and pick a reference_latents_method from a dropdown: offset, index, uxo/uno, or index_timestep_zero. All it does is copy the conditioning and set a reference_latents_method key inside it. The downstream sampler reads that key when it decides how to interleave the reference latent tokens with the generated-token positions - offset by a fixed amount, indexed by position, or aligned to timestep zero. Same conditioning, same references, different geometry.

Where people actually meet it: Qwen-Image-Edit repacks. ComfyUI's own repackaged files work without this node - the official templates even carry a note saying so. But third-party repacks from other people sometimes need the flag set, and index_timestep_zero is the value you'll see in those templates. If an edit comes out with references scrambled or swapped, or the model keeps putting the reference subject where it shouldn't be, try each method in turn - it's a two-second experiment.

The one input that matters

  • reference_latents_method - the dropdown. offset and index are the two classic arrangements; uxo/uno is a shorthand that normalizes to the same code path (the source literally rewrites it to "uxo"); index_timestep_zero is the one the official Qwen edit templates default to. When in doubt and things look broken, start there.

Everything else is plumbing: conditioning in, the same CONDITIONING out, ready to feed a sampler or another conditioning node.

How you get it

It ships in ComfyUI core - no install, it's under the Flux category in the node menu. The model files are another story and they're the real work: multi-reference editing needs the actual edit-model checkpoint (Flux Kontext dev, or a Qwen-Image-Edit model) plus its text encoder and VAE in the usual models/diffusion_models, models/text_encoders, and models/vae folders.

The honest take

This node is a sharp-edged tool for a workflow you'll only build if you're doing serious character-consistency or multi-image reference work - turnaround sheets, "keep subject A's face, subject B's outfit" prompts. Most people never need it, and for a single reference image it's typically unnecessary. But it's the kind of core node that saves a genuinely baffling hour when you do hit the multi-reference case: one wrong placement flag and you'll blame the model, the LoRA, and your own sanity before you remember the dropdown. Now you know the dropdown.

Categorymodel/conditioning/flux

Inputs (2)

NameTypeDefaultDescription
conditioningCONDITIONING
reference_latents_methodCOMBO4 options: offset, index, uxo/uno, index_timestep_zero

Outputs (1)

NameTypeDescription
CONDITIONINGCONDITIONING