Simple Image Generator (Multiple)
Several reference images in, one composite out — the multi-reference editor
- reference_images
- image
- log
Simple Image Generator (Multiple) is the multi-reference version of the pack's single-image node, and it's the one you want when one reference isn't enough. A face and a product, a character and a prop, two subjects that have to appear together in a single generated frame - this node takes up to 8 reference images and conditions the generation on all of them at once.
The classic setup is an LLM writing the description while this node grounds it in your real photos: two Load Image nodes feed reference shots into a Reference Image Loader, an LLM prompt-enhancer writes a detailed prompt describing how they should combine, and this node turns that into one composite. The references keep the subject's identity and the product's appearance, which is exactly what marketing shots, product placement, and character-plus-prop continuity ask for.
How it differs from the plain version
Everything about the sampler side is identical to Simple Image Generator - same Flux2-style conditioning, same loaders, same steps/cfg/guidance/sampler settings. The differences are what matter:
- One batched
reference_imagesinput instead of slots. You connect a single wire (typically from a Reference Image Loader, or any IMAGE batch) and the node splits it internally intoimage 1, image 2, …- no slot-by-slot wiring, and with nothing connected it behaves as plain text-to-image. - Every reference gets its own
ReferenceLatentin the positive conditioning. This is Flux2's multi-reference editing path - the model sees all of them at once rather than being blended into one blob. - Aspect-preserving sizing via
reference_size_mode:match_first_reference(default) orfit_to_width_height. References are scaled keeping their aspect ratio - no stretch, squash, or crop. save_to_disk/output_subdir/filename_prefixfor writing the result straight to disk.- After a run, a thumbnail strip of the references used shows at the top of the node.
Outputs are the same image and log pair.
The restart caveat
The thumbnail strip and output-mode select are added by a frontend script (web/zfrnodes.js), so this node needs a full ComfyUI restart after install or update - a browser refresh won't register the UI. If you install the pack and the node looks half-finished, that's why.
Install
Via ComfyUI Manager (search "ComfyUI-ZFRNodes") or:
cd /path/to/ComfyUI/custom_nodes
git clone https://github.com/zfrsgtcu/ComfyUI-ZFRNodes.git
Dependencies are just numpy, torch, and Pillow - already in ComfyUI - and the pack downloads no model files. You supply a Flux2-compatible model; the pack is built and tested with flux-2-klein, and multi-reference editing lives or dies on that model's ReferenceLatent support.
Where people get tripped up: this only works well on models that actually support reference-latent conditioning, so don't point it at an SD1.5 checkpoint and expect the magic. And with eight references, VRAM adds up - the batch gets encoded and injected in full. Start with two or three references before you load it up.
Inputs (23)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | — | |
| unet_name | COMBO | 0 options: | |
| vae_name | COMBO | 0 options: | |
| clip_name | COMBO | 0 options: | |
| clip_type | COMBO | flux2 | 28 options: stable_diffusion, stable_cascade, sd3, stable_audio, mochi, ltxv, +22 |
| lora_name | COMBO | 1 options: None | |
| lora_strength | FLOAT | 1.00-10–10 | — |
| trigger_words | STRING | — | |
| width | INT | 96064–8192 | — |
| height | INT | 120064–8192 | — |
| steps | INT | 81–200 | — |
| cfg | FLOAT | 1.00–30 | — |
| guidance | FLOAT | 3.50–100 | — |
| denoise | FLOAT | 1.000–1 | — |
| sampler_name | COMBO | euler | 44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38 |
| scheduler | COMBO | simple | 9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3 |
| seed | INT | 00–18446744073709550000 | — |
| seed_mode | COMBO | random | 2 options: random, fixed |
| reference_size_modeopt | COMBO | match_first_reference | 2 options: match_first_reference, fit_to_width_height |
| reference_imagesopt | IMAGE | — | |
| save_to_diskopt | BOOLEAN | false | — |
| output_subdiropt | STRING | simple_image | — |
| filename_prefixopt | STRING | image | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| log | STRING | — |