Nunchaku FLUX.2 Klein Multi Reference Latent
Up to eight reference images into one Klein edit, in order
- conditioning
- latent_1
- latent_2
- latent_3
- latent_4
- latent_5
- latent_6
- latent_7
- latent_8
- conditioning
Multi-reference editing is Klein's whole reason to exist - it's the thing that displaced Qwen-Image-Edit in a lot of workflows, because you stop maintaining separate gen and edit checkpoints. This is the node that feeds it references. It takes a conditioning stream and up to eight VAE-encoded reference latents, attaches them in order, and hands the bundle to the sampler. The first reference goes in latent_1, the next in latent_2, and so on - the position in this node is what every other reference-aware node in this pack refers to as a reference_index.
Why you'd reach for it
Klein shines at "keep this thing, change that thing." Give it a person and a garment and ask it to put the garment on the person; give it three angles of a product for a try-on. Each reference is a role the model can read from. Order matters, which is the part people get burned on: the nodes downstream that let you weight or mask a specific reference (Ref Latent Weight, Mask Ref Controller, Color Anchor) all index into this node's list, so reference_index 0 is latent_1, index 1 is latent_2, and so on. Shift a wire and every index downstream silently means something else.
How it works
The mechanism is simple and worth understanding because it explains the whole pack's design: references are encoded to latents, then attached to the conditioning object by index. It's "target-owned ordered multi-reference conditioning," which is a fancy way of saying this node owns the ordering contract that the rest of the enhancer family respects. The source is adapted from capitan01R's Flux2Klein-Enhancer under MIT (the pack credits it), so if you've used that pack the semantics carry over.
Inputs and outputs
conditioning (required) plus latent_1 (required) and latent_2 through latent_8 (optional) - all LATENTs, so VAE-encode your images first with a standard VAE Encode. Output is a single conditioning, chained into the sampler or into a reference enhancer.
Installing
Same pack, same steps as every node here:
cd ComfyUI/custom_nodes
git clone https://github.com/tom-m-2020/ComfyUI-Nunchaku-Klein
Then the backend that actually matters: Vitoom Nunchaku wheel from huggingface.co/tonera/vitoom-nunchaku, tonera's Klein checkpoint in diffusion_models/. Restart, and you're set.
Common issues
- Editing ignores a reference - check ordering. If you meant reference 2 but plugged it into
latent_1, downstreamreference_indexvalues are off by one. - References change the whole image, not just the target - that's Klein's known identity/warm-shift behavior on edits, not a wiring bug. Pair this node with Color Anchor (for the color cast) or Mask Ref Controller (to limit where a reference acts).
- Same seed, different output - documented Nunchaku nondeterminism; don't A/B your references against a fixed seed expecting bit-identical results.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| conditioning | CONDITIONING | — | |
| latent_1 | LATENT | — | |
| latent_2opt | LATENT | — | |
| latent_3opt | LATENT | — | |
| latent_4opt | LATENT | — | |
| latent_5opt | LATENT | — | |
| latent_6opt | LATENT | — | |
| latent_7opt | LATENT | — | |
| latent_8opt | LATENT | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| conditioning | CONDITIONING | — |