Nodes/ComfyUI_StarNodes/⭐ Star Flux2 Conditioner
ComfyUI Node

⭐ Star Flux2 Conditioner

Text plus up to five reference images, conditioned the way Flux2 actually wants it

By Starnodes2024·Created 2 years ago·Updated 2 days ago· 106
⭐ Star Flux2 Conditioner
  • clip
  • vae
  • image_1
  • image_2
  • image_3
  • image_4
  • image_5
  • POS
  • NEG
  • GRID_IMAGE
textYour prompt here...
join_referencestrue

Flux2's superpower is multi-reference editing - it can take one or several reference images and fold them into the generation, which is how you get "this character, this outfit, this background" in a single prompt. The problem is that conditioning a Flux2 model with reference images is a fiddly multi-step chore: encode the text, VAE-encode each reference, scale everything to a sane resolution, and join multiple references the way the model expects. Star Flux2 Conditioner packages all of that into one node: prompt in, up to five reference images in, ready-to-use positive/negative conditioning out.

It's in ⭐StarNodes/Conditioning.

How it works

The required inputs are clip, vae, and text - the encoder, the reference-image encoder, and your prompt. Then up to five optional image_1image_5 slots.

Internally it encodes the prompt with the clip, encodes a zero/empty negative for the NEG output, and then handles the references:

  • The first connected image is VAE-encoded as the primary reference and added to the conditioning - scaled first (the node normalizes images toward ~1 megapixel, which keeps the VAE encode from blowing up on huge inputs).
  • The rest (image_2image_5) are the multi-reference part. With join_references on (the default), the extra images are assembled into a 2×2 grid, scaled to 1MP, and VAE-encoded as a single joined reference - that's the Flux2-style "here are several reference images" conditioning. With it off, each extra image is encoded individually.

The three outputs

  • POS - positive conditioning, prompt + reference images, straight into a sampler.
  • NEG - negative conditioning.
  • GRID_IMAGE - the actual 2×2 grid image the node built from your references, sent back out as an IMAGE. This is a genuinely nice touch: you can preview exactly what the model is being conditioned on, and spot a bad grid (misaligned, wrong aspect) before you waste a generation.

Why you'd use it

Because building Flux2 reference conditioning by hand means knowing the exact recipe - which order, what resolution scaling, how to join references - and that recipe lives in tutorial videos, not in the UI. This node encodes the working pattern so you don't have to. For Klein/Flux2 editing workflows (see the KB's Flux-2 guide for the Klein landscape) it slots in where you'd otherwise have a small subgraph of encode nodes.

Installing it

Standard StarNodes install - ComfyUI Manager, search Starnodes, install, restart:

cd ComfyUI/custom_nodes
git clone https://github.com/Starnodes2024/ComfyUI_StarNodes
cd ComfyUI_StarNodes
pip install -r requirements.txt

Search the canvas for star - it's under ⭐StarNodes/Conditioning.

Gotchas

The join_references toggle is where the behavior forks, and it's worth actually understanding: joined-grid references are the right pattern for "here are a few style/identity references together," while individual encoding treats each image as its own reference slot. Use the GRID_IMAGE output to sanity-check the grid before generating. Also, the grid is always 2×2 - five images means the last one gets folded in, so don't expect true 5-slot handling; in practice people use 1, 4, or let the fifth ride along. And remember the references are VAE-encoded and resolution-scaled, so extremely low-res or badly cropped source images will make the whole conditioning weaker - garbage references in, conditional garbage out.

Category⭐StarNodes/Conditioning

Inputs (9)

NameTypeDefaultDescription
clipCLIP
vaeVAE
textSTRINGYour prompt here...
join_referencesBOOLEANtrue
image_1optIMAGE
image_2optIMAGE
image_3optIMAGE
image_4optIMAGE
image_5optIMAGE

Outputs (3)

NameTypeDescription
POSCONDITIONING
NEGCONDITIONING
GRID_IMAGEIMAGE