Nodes/ComfyUI-Xz3r0-Nodes/XKleinRefListConditioning
ComfyUI Node

XKleinRefListConditioning

Feed FLUX.2 Klein a whole list of reference images

By Xz3r0-M·Created 8 months ago·Updated about 6 hours ago· 13
XKleinRefListConditioning
  • positive_conditioning
  • negative_conditioning
  • vae
  • image_list
  • positive_conditioning
  • negative_conditioning

Here's the model-specific node in an otherwise-all-plumbing pack. FLUX.2 Klein's signature trick is multi-reference consistency - you hand it a few images of a character, an object, or a style, and it keeps them consistent without training a LoRA. The stock ComfyUI flow handles that one image at a time. XKleinRefListConditioning is for when you want to feed Klein a list of reference images and have all of them baked into the conditioning in one shot.

How it works

You wire in positive_conditioning, negative_conditioning, a vae, and an image_list. The node walks the list in order, encodes every image into a FLUX.2-Klein reference latent, and appends each one to both the positive and negative conditioning, which is what the Klein architecture expects - the negative side needs the same references so it doesn't fight them. Two conditionings come out, ready to feed your sampler.

The list handling is where it earns its name. Anything you can produce as an IMAGE list works - the pack's XListCreate output being the obvious match, or any list-carrying wire. Each list item is processed in order, and if an item is an IMAGE batch, it's split along the batch dimension into single frames. The practical ceiling: at most 50 reference frames get applied, so keep your list sane. Leave image_list unconnected and you get passthrough conditioning, which makes the node safe to leave in a template workflow.

What you need first

The references are encoded with the Klein VAE, so you need the real FLUX.2-Klein weights loaded before this node does anything. Klein 4B runs in roughly 13GB of VRAM quantized (Apache 2.0, the commercially usable tier), and 9B is the beefier non-commercial sibling - the KB's Flux 2 panel is a good read on which tier you actually want. If you've never run Klein, expect a bit of a hardware check before this node becomes interesting.

Installing it

XKleinRefListConditioning ships in ComfyUI-Xz3r0-Nodes (by Xz3r0-M) under ♾️ Xz3r0/Workflow-Processing. ComfyUI Manager: search ComfyUI-Xz3r0-Nodes and install. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/Xz3r0-M/ComfyUI-Xz3r0-Nodes.git
cd ComfyUI-Xz3r0-Nodes
pip install -r requirements.txt

Restart ComfyUI, then make sure your FLUX.2-Klein checkpoint and its VAE are in place - this node doesn't download models for you.

Gotchas

Two failure modes are worth knowing about. If a list item isn't an IMAGE tensor, the node raises a clear error telling you exactly that - it's strict about input types. And because Klein is guidance-distilled, don't go cranking CFG when you add references; the KB's concepts doc is blunt that CFG 1.2–1.5 is a real anatomy fix on Klein and beyond that you're overcooking. The reference frames cap at 50 means you'll silently lose anything past the first 50, so if your output looks like a reference went missing, count your inputs.

Category♾️ Xz3r0/Workflow-Processing

Inputs (4)

NameTypeDefaultDescription
positive_conditioningCONDITIONINGPositive conditioning input
negative_conditioningCONDITIONINGNegative conditioning input
vaeVAEVAE used to encode reference images
image_listoptCOMFY_MATCHTYPE_V3IMAGE list of reference images. Connect XListCreate list output (or any IMAGE list wire). Leave unconnected for passthrough conditioning.

Outputs (2)

NameTypeDescription
positive_conditioningCONDITIONINGPositive conditioning with reference latents
negative_conditioningCONDITIONINGNegative conditioning with reference latents