Nodes/ComfyUI-ZFRNodes/Simple Image Generator (Multiple)
ComfyUI Node

Simple Image Generator (Multiple)

Several reference images in, one composite out — the multi-reference editor

By zfrsgtcu·Created 3 months ago·Updated 2 months ago· 31
Simple Image Generator (Multiple)
  • reference_images
  • image
  • log
prompt
unet_name
vae_name
clip_name
clip_typeflux2
lora_name
lora_strength1.00
trigger_words
width960
height1200
steps8
cfg1.0
guidance3.5
denoise1.00
sampler_nameeuler
schedulersimple
seed0
seed_moderandom
reference_size_modematch_first_reference
save_to_diskfalse
output_subdirsimple_image
filename_prefiximage

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_images input instead of slots. You connect a single wire (typically from a Reference Image Loader, or any IMAGE batch) and the node splits it internally into image 1, image 2, … - no slot-by-slot wiring, and with nothing connected it behaves as plain text-to-image.
  • Every reference gets its own ReferenceLatent in 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) or fit_to_width_height. References are scaled keeping their aspect ratio - no stretch, squash, or crop.
  • save_to_disk / output_subdir / filename_prefix for 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.

Categoryzfr-nodes

Inputs (23)

NameTypeDefaultDescription
promptSTRING
unet_nameCOMBO0 options:
vae_nameCOMBO0 options:
clip_nameCOMBO0 options:
clip_typeCOMBOflux228 options: stable_diffusion, stable_cascade, sd3, stable_audio, mochi, ltxv, +22
lora_nameCOMBO1 options: None
lora_strengthFLOAT1.00-10–10
trigger_wordsSTRING
widthINT96064–8192
heightINT120064–8192
stepsINT81–200
cfgFLOAT1.00–30
guidanceFLOAT3.50–100
denoiseFLOAT1.000–1
sampler_nameCOMBOeuler44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
schedulerCOMBOsimple9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3
seedINT00–18446744073709550000
seed_modeCOMBOrandom2 options: random, fixed
reference_size_modeoptCOMBOmatch_first_reference2 options: match_first_reference, fit_to_width_height
reference_imagesoptIMAGE
save_to_diskoptBOOLEANfalse
output_subdiroptSTRINGsimple_image
filename_prefixoptSTRINGimage

Outputs (2)

NameTypeDescription
imageIMAGE
logSTRING