Nodes/Diztraido Nodes/Flux Load References
ComfyUI Node

Flux Load References

Text encode, reference images, and blank negative — chained in one node

By jadervasque·Created 2 months ago·Updated 2 months ago· 0
Flux Load References
  • clip
  • vae
  • image_input_1
  • image_input_2
  • image_input_3
  • image_input_4
  • image_input_5
  • image_input_6
  • image_input_7
  • image_input_8
  • image_input_9
  • image_input_10
  • image_input_11
  • image_input_12
  • image_input_13
  • image_input_14
  • image_input_15
  • image_input_16
  • positive
  • blank_negative
text_prompt
reference_count0
image_ref_1
image_ref_2
image_ref_3
image_ref_4
image_ref_5
image_ref_6
image_ref_7
image_ref_8
image_ref_9
image_ref_10
image_ref_11
image_ref_12
image_ref_13
image_ref_14
image_ref_15
image_ref_16

Flux.2's signature move is multi-reference generation: give it up to ten images and it composes a consistent character, object, or style across them - no LoRA training required. In raw ComfyUI that means a small assembly line: a CLIPTextEncode, a LoadImage per reference, a VAEEncode each, and then the ReferenceLatent node chained once per image to fold each reference into the conditioning. Flux Load References (class DiztraidoReferenceChain) collapses that into one node: connect clip and vae, type a prompt, set reference_count, pick the reference images, and it hands you the finished positive conditioning plus a blank negative conditioning, ready for a sampler.

This is the node that makes the pack's Flux.2 story work end to end: load models with DiztraidoLoadFlux2Models, build references here, sample with the Flux Sampler.

How it works

Internally it runs ComfyUI's native nodes in sequence. It encodes your text_prompt with CLIPTextEncode, then for each active reference it loads the image (LoadImage), encodes it to latent space (VAEEncode), and appends it to the conditioning via ReferenceLatent - each reference chained after the last, in slot order. Finally it encodes an empty string to produce blank_negative, which is the correct negative for Flux.2 guidance-distilled workflows (you generally don't want a meaningful negative there). The references are the Flux.2 mechanism itself, not a ControlNet or a LoRA - you get the model's native multi-reference behavior.

The inputs that matter

  • clip and vae - from your Flux.2 loader.
  • text_prompt - the positive prompt, multiline.
  • reference_count - 0 to 16 active reference slots. Set this first; it controls how many pickers matter.
  • image_ref_1image_ref_16 - dropdowns of images in ComfyUI/input/. Slots beyond reference_count are ignored.
  • Optional image_input_1image_input_16 - the same slots but as IMAGE sockets, so you can feed a reference from another node (an upscaled or preprocessed image) instead of a file on disk. If both are connected for a slot, the socket wins.

Outputs: positive (CONDITIONING) and blank_negative (CONDITIONING) - wire both into the sampler.

How to install

Part of Diztraido Nodes. ComfyUI Manager → search "Diztraido Nodes" → install diztraido-nodes → restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/jadervasque/ComyUI-Diztraido.git

Restart and it's under the Diztraido flux category. No extra dependencies; it calls native ComfyUI nodes, so you need a ComfyUI build that ships ReferenceLatent (Flux.2-era ComfyUI).

Common issues

The two things people trip on: forgetting that reference_count gates everything - you can fill ten image pickers and see nothing happen because the count is still 0 - and the VAE/CLIP expectation, since this node needs the Flux.2 loader's clip and vae wired in before anything else. Also set expectations on reference strength: Flux.2 references are powerful, but a heavily-cropped or low-quality reference propagates its flaws into the output - feed it clean, well-lit images. And if you're on Klein rather than dev, reference behavior matches the model's distillation: same mechanism, but don't expect identical prompt adherence to dev. It's also not a ControlNet: for strict pose or layout control you'd still reach for other tools.

CategoryDiztraido/flux

Inputs (36)

NameTypeDefaultDescription
clipCLIP
vaeVAE
text_promptSTRING
reference_countINT00–16
image_ref_1COMBO2 options: , example.png
image_ref_2COMBO2 options: , example.png
image_ref_3COMBO2 options: , example.png
image_ref_4COMBO2 options: , example.png
image_ref_5COMBO2 options: , example.png
image_ref_6COMBO2 options: , example.png
image_ref_7COMBO2 options: , example.png
image_ref_8COMBO2 options: , example.png
image_ref_9COMBO2 options: , example.png
image_ref_10COMBO2 options: , example.png
image_ref_11COMBO2 options: , example.png
image_ref_12COMBO2 options: , example.png
image_ref_13COMBO2 options: , example.png
image_ref_14COMBO2 options: , example.png
image_ref_15COMBO2 options: , example.png
image_ref_16COMBO2 options: , example.png
image_input_1optIMAGE
image_input_2optIMAGE
image_input_3optIMAGE
image_input_4optIMAGE
image_input_5optIMAGE
image_input_6optIMAGE
image_input_7optIMAGE
image_input_8optIMAGE
image_input_9optIMAGE
image_input_10optIMAGE
image_input_11optIMAGE
image_input_12optIMAGE
image_input_13optIMAGE
image_input_14optIMAGE
image_input_15optIMAGE
image_input_16optIMAGE

Outputs (2)

NameTypeDescription
positiveCONDITIONING
blank_negativeCONDITIONING