LTX Multi Reference Slots
How Multi Reference Slots keeps them from merging
- model
- positive
- negative
- vae
- latent
- reference_1
- reference_2
- reference_3
- reference_4
- reference_5
- reference_6
- references
- model
- positive
- negative
- latent
- info
The whole problem with multi-character video is that the model keeps fusing your two characters into a third person nobody asked for. LTX-2.3 got reference conditioning good enough that the community started training LoRAs for exactly this - reference image in, character identity out - and this node is the part that actually wires those references in. It's the apply-side of the workflow: you give it up to six reference images, it hands you back a patched model that knows which image is which.
Here's the thing the README hammers on: a plain LoRA loader is not enough for these multi-subject-reference LoRAs. They're trained with a specific conditioning path - separate reference blocks, each with its own rotary phase in the RoPE grid, plus a learned per-slot tag. Load the LoRA, and ComfyUI applies the adapter weights but silently drops everything else, including the slot embeddings the model was trained on. This node rebuilds the whole path so sampling matches training. That mismatch is the #1 reason people try these workflows and get a completely different character.
How it works
Each connected reference gets VAE-encoded and turned into its own reference block with a distinct source_id (start_source_id + its slot index). The source id maps to a rotary phase in the model's positional grid, which is what keeps the references spatially separate instead of them collapsing into one averaged blob. If you point slot_embedding_lora at the LoRA file, the node reads the trained slot embedding straight out of the safetensors (under diffusion_model.reference_slot_embedding.*) and adds it, scaled by slot_strength, into feature space. Then it monkey-patches the LTXV internals at runtime so the whole pipeline behaves like the training-time conditioning. It's the same approach the pack's LTXIdentityOverlap nodes use, so they coexist fine in one graph.
The inputs that matter
Required: model, positive, negative, vae, latent - same shape as any LTX conditioning node. The model input takes the output of your standard Load LoRA node.
slot_embedding_lora- the one beginners miss. Point it at the same LoRA you loaded. Without it, references are untagged and the checkpoint gets sampled without a signal it was trained on.slot_strength- scales the learned tag. Match it to the LoRA strength you set on the loader. Undertrained LoRAs often want 1.2–1.5, and the tag wants the same.layout- where references sit in the RoPE grid:overlap,st_drc, orstrata. Must match how the checkpoint was trained.ref_resize_mode-match_target_letterboxis the safe default;match_targetcentre-crops and can slice a subject in half on aspect-ratio mismatch.
Outputs are model, positive, negative, latent (patched model + pass-throughs you wire into the sampler) and an info string that tells you how many references landed, on which source ids.
Install
ComfyUI Manager → search "ComfyUI-BFSNodes" → Install, then restart. Or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/alisson-anjos/ComfyUI-BFSNodes.git
cd ComfyUI-BFSNodes
pip install -r requirements.txt
Restart ComfyUI. The heavy deps (insightface==0.7.3, onnxruntime) belong to the pack's face-loading nodes, not this one - but the pip install pulls them anyway, and that insightface==0.7.3 pin is the classic install headache on newer Python. If you hit it, you can install just torch + safetensors for these LTX nodes and skip the rest. You also need an LTX-2.3 model with its VAE and a multi-subject-reference LoRA; the README expects the first public one to be edit_anything_reference_v0.1_r128_12000.safetensors in ComfyUI/models/loras/.
Common issues
The community's first-gen multi-reference LoRAs are finicky. The recurring report (the Licon MSR threads on r/StableDiffusion) is that references keep their clothing and colors but the faces drift - LTX's weakest spot is identity fidelity, so set expectations accordingly. If the model ignores the reference entirely, check, in order: slot_embedding_lora is actually set, layout matches training, your prompt tags match the training convention (see LTX Reference Tags), and slot_strength is proportional to the LoRA strength. If the node raises "carries no slot embedding," the checkpoint was trained phase-separation-only - set the field back to none and you're fine. And a slightly negative reference_temporal_offset_latents is the experimental knob for the frame-0 artifact where the reference briefly flashes at the start of the clip.
Inputs (19)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| positive | CONDITIONING | — | |
| negative | CONDITIONING | — | |
| vae | VAE | — | |
| latent | LATENT | — | |
| reference_1opt | IMAGE | Reference image for slot 1 — the subject your prompt calls <Image 1>. Leave unconnected to skip; connected slots are numbered in order, so wiring 1 and 3 gives them source ids 1 and 2. | |
| reference_2opt | IMAGE | Reference image for slot 2 — the subject your prompt calls <Image 2>. Leave unconnected to skip; connected slots are numbered in order, so wiring 1 and 3 gives them source ids 1 and 2. | |
| reference_3opt | IMAGE | Reference image for slot 3 — the subject your prompt calls <Image 3>. Leave unconnected to skip; connected slots are numbered in order, so wiring 1 and 3 gives them source ids 1 and 2. | |
| reference_4opt | IMAGE | Reference image for slot 4 — the subject your prompt calls <Image 4>. Leave unconnected to skip; connected slots are numbered in order, so wiring 1 and 3 gives them source ids 1 and 2. | |
| reference_5opt | IMAGE | Reference image for slot 5 — the subject your prompt calls <Image 5>. Leave unconnected to skip; connected slots are numbered in order, so wiring 1 and 3 gives them source ids 1 and 2. | |
| reference_6opt | IMAGE | Reference image for slot 6 — the subject your prompt calls <Image 6>. Leave unconnected to skip; connected slots are numbered in order, so wiring 1 and 3 gives them source ids 1 and 2. | |
| referencesopt | LTX_REFS | Output of LTX Reference Images. Use this OR the individual reference_N slots below — the list wins if both are connected. | |
| slot_embedding_loraopt | COMBO | none | The LoRA file to read the trained slot embedding from. Point this at the SAME LoRA you load for sampling. ComfyUI's LoRA loader applies only LoRA weights and drops the slot embedding, so without this the references are untagged and the checkpoint is sampled without a signal it was trained on. 'none' = phase separation only (older checkpoints). |
| start_source_idopt | INT | 10–8 | Source id of the first connected reference; the rest count up. The target is always 0. Start at 1 unless the checkpoint was trained otherwise. |
| phase_scaleopt | FLOAT | 1.00–4 | — |
| slot_strengthopt | FLOAT | 1.000–4 | Scales the learned slot tag. The tag and the adapter were trained together at strength 1.0, so raising the LoRA on the loader without raising this leaves them out of proportion — the adapter shouts while the tag that tells the references apart stays quiet. Match this to the LoRA strength you set on the loader (an undertrained LoRA often wants 1.2-1.5, and the tag wants the same). |
| layoutopt | COMBO | overlap | Where the references sit in the RoPE grid. Must match training. |
| ref_resize_modeopt | COMBO | match_target_letterbox | Letterbox is the safe default for subject references: it keeps the whole image, where match_target centre-crops and can cut a subject in half when the aspect ratios differ. |
| reference_temporal_offset_latentsopt | INT | 0-8–8 | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| model | MODEL | — |
| positive | CONDITIONING | — |
| negative | CONDITIONING | — |
| latent | LATENT | — |
| info | STRING | — |