Multi ReferenceLatent
How you actually feed reference images into Klein
- conditioning
- latent_1
- latent_2
- latent_3
- latent_4
- latent_5
- latent_6
- latent_7
- latent_8
- conditioning
This is the node that quietly makes every other node in the pack possible. It's not flashy - no strength sliders, no fancy modes - but if you're doing anything reference-based with FLUX.2 Klein through this pack, this is the thing that actually gets the reference images into the model in the first place.
What it does
Klein natively supports up to ten reference images, and it keeps their latents entirely separate from your text conditioning - appended as their own token sequence in the model's image stream, patchified independently, with an exact runtime token count (reference_image_num_tokens) the model tracks per reference. This node is what builds that structure: it takes up to eight VAE-encoded latents and packs them into your conditioning object as an indexed reference list, storing meta["reference_latents"] and meta["reference_latents_method"] = "index" under the hood.
It replaces the conditioning's existing reference list rather than appending to it - so if you chain two of these, the second one wins, not both.
The inputs and output
conditioning- your existing positive conditioning (from CLIP Text Encode, Sectioned Encoder, or anything downstream of those).latent_1- required. Your first reference, already VAE-encoded - not a raw image.latent_2throughlatent_8- optional, same rule: encoded latents, not images. Reference order matters and is shared with every downstream masking node in the pack:latent_1corresponds tosubject_mask_1,latent_2tosubject_mask_2, and so on, all the way to 8.
There's no weighting, no append mode, no per-reference strength here - that control lives in the other nodes further down the chain (Ref Latent Controller, Ref Latent Weight, Mask Ref Controller). This node's whole job is getting the references in.
Output is a single conditioning - feed it straight to your sampler's positive input.
Installing it
ComfyUI Manager: search ComfyUI-Flux2Klein-Enhancer, install, restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/capitan01R/ComfyUI-Flux2Klein-Enhancer.git
No extra Python packages required.
Where people get burned
The one thing worth repeating because it trips people up constantly: the inputs are latents, not images. VAE-encode every reference with the FLUX.2 VAE before it reaches this node. Wire an IMAGE output straight into latent_1 and you'll get a type-mismatch error at graph time, which at least fails loudly - the more subtle version of the same mistake is encoding with the wrong VAE and getting a reference that technically loads but doesn't influence the generation the way you expect.
Second: this node does not control your output resolution. The canvas size is still whatever latent you hand to the sampler, not the dimensions of your references. It's easy to assume a 1024×1024 reference means a 1024×1024 output - it doesn't, and the two are unrelated unless you set them that way yourself.
Third, if you're layering identity-transfer or masking nodes on top of this (Identity Feature Transfer Final, Mask Ref Controller, Ref Latent Controller), remember the reference order set here is the order every one of those nodes assumes. Reordering your latent inputs later without updating your masks elsewhere in the graph is a quiet way to attach the wrong mask to the wrong subject.
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 | — |