Multiple Reference Apply ๐
Reference-only attention injection, but from more than one reference at once
- model
- MODEL
This is ReferenceApply's sibling for when one reference isn't enough. Same underlying trick - the old reference-only technique, where instead of a separate ControlNet model you share a reference's own self-attention keys and values with the rest of a batch during denoising - but instead of a single index, you pass a list of indices, so multiple batch positions can each act as a reference simultaneously.
Worth knowing where this sits historically: reference-only self-attention injection was the first real zero-shot, zero-training consistency trick the community had, before IP-Adapter took over the face/character-consistency job and before instruction-editing models (Qwen-Image-Edit and friends) took over most of what's left. It's legacy now, but it still works, needs no extra checkpoint, and needs no training run - which is exactly the appeal of reaching for it here instead of a heavier adapter stack.
How it differs from the single-reference version
ReferenceApply takes one index and exposes a mode combo. This node takes indices - a comma-separated string, default "0" - and drops the mode field entirely, which implies the combining behavior here is fixed rather than user-selectable. It also adds weights, a comma-separated string (default blank) meant to pair up with your indices list and control how strongly each reference contributes relative to the others. The schema doesn't spell out what happens with weights left blank - leave it empty first for whatever the default balancing is, and only fill it in (matching your indices, one weight per index) once you have a reason to weight one reference more than another.
Everything else matches ReferenceApply: model in, patched MODEL out, depth (-1 to 12, default 12) for how many UNet attention depths get the patch, start_step/end_step (0โ1) to window the effect across the sampling schedule, and apply_input/apply_middle/apply_output to toggle which UNet block groups are touched.
Building the batch it needs
Like its sibling, this node expects the reference latents to already exist inside your batch at the positions you list in indices - it doesn't take a reference image or reference latent input directly. MultipleReferenceLatent, also in this pack, is built for exactly this: it takes one starting latent and stamps it into the batch positions you name, which is what gives indices here something real to point at.
Installing it
Via ComfyUI Manager: search cgem156-ComfyUI, install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/laksjdjf/cgem156-ComfyUI
Restart afterward. No downloads beyond the pack itself - it's a model-attention patch, nothing external to fetch.
Common issues & troubleshooting
No visible effect from adding a second reference. Confirm both indices actually correspond to real reference latents in your batch (check MultipleReferenceLatent's output), and that neither got left out of the indices string by a typo.
One reference seems to dominate. Try the weights field - even without knowing the exact fallback math, explicitly setting weights for each index is the obvious lever if the balance feels off with it blank.
This is one of the pack's quieter, less-documented corners. It isn't in the README's feature table, and there's essentially no community discussion of this specific node - expect to tune by feel rather than find a settings guide. If you only need one reference, ReferenceApply is the simpler, better-known sibling and comes with a mode option this one drops.
You're not sure this is even the right tool. If your goal is straightforward character consistency and you're not deep into building custom attention patches, a 2026-era instruction-editing model or IP-Adapter is very likely the faster, better-supported path - reference-only self-attention injection is the technique for when you specifically want it at the raw model-patch level with no extra model to load.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | โ | |
| indices | STRING | 0 | โ |
| depth | INT | 12-1โ12 | โ |
| start_step | FLOAT | 0.000โ1 | โ |
| end_step | FLOAT | 1.000โ1 | โ |
| apply_input | BOOLEAN | true | โ |
| apply_middle | BOOLEAN | true | โ |
| apply_output | BOOLEAN | true | โ |
| weights | STRING | โ |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | โ |