JLC Flux2 Reference Image Orchestrator
Ten reference images into FLUX.2, through native conditioning
- positive
- negative
- vae
- reference_image_1
- reference_image_2
- reference_image_3
- reference_image_4
- reference_image_5
- reference_image_6
- reference_image_7
- reference_image_8
- reference_image_9
- reference_image_10
- positive
- negative
- vae
- reference_image_1
- reference_image_2
- reference_image_3
- reference_image_4
- reference_image_5
- reference_image_6
- reference_image_7
- reference_image_8
- reference_image_9
- reference_image_10
- diagnostics_json
Multi-reference conditioning is the whole reason FLUX.2 is worth its size: show the model who or what you mean, and it edits instead of hallucinating. JLC Flux2 Reference Image Orchestrator is the pack's way of feeding that - up to ten reference images, VAE-encoded and attached through ComfyUI's native reference_latents conditioning mechanism, then routed to positive, negative, or both conditioning streams. It's the stable reference path in this ecosystem, and it's deliberately conservative: no weighting, no fusion, no pooling - just stock FLUX.2 behavior with more slots and a cache bolted on.
How it works
Enabled images are VAE-encoded (or pulled from the pack's bounded CPU reference-latent cache) and appended in slot order through the native reference-latents channel. The two dropdowns are where the design decisions live:
apply_to-positive_and_negative(default),positive_only, ornegative_only. Attaches the same reference sequence to the streams you pick.reference_latents_method- the optional equivalent of ComfyUI's native Edit Model Reference Method node:do_not_set(default),offset,index,uxo/uno,index_timestep_zero. These change how reference tokens are positioned relative to the main latent, and for anything unusual you'll want to read up on the native method semantics first.
Then the slot machinery: slot_count (1–10) sets how many slots are visible, and each enabled_N toggle drops that slot before validation, cache lookup, encoding, or conditioning - the "off" path costs you nothing. cache_enabled (on by default) reuses the CPU reference-latent cache so unchanged references aren't re-encoded, with cache_max_entries, cache_max_cpu_mb, and clear_cache_before_run to keep it bounded. diagnostics is the usual reporting toggle.
Outputs are positive and negative conditioning, a pass-through vae, reference_image_1..10 pass-throughs, and a diagnostics_json string. This node sits before the ControlNet Apply or Orchestrator in the workflow.
Installing it
cd ComfyUI/custom_nodes
git clone https://github.com/Damkohler/JLC-Flux2-ControlNet.git
Restart ComfyUI or install "JLC Flux2 ControlNet" via Manager. Requires current ComfyUI with native FLUX.2 support, Python 3.10+, and a FLUX.2-dev model stack (text encoder + VAE). No pip dependencies.
Where people get burned
Two things, mostly. First, your resizing and cropping are done before this node - it encodes exactly the image tensor it receives, so references you didn't prepare will come out oddly composed. Second, the cache: it's method-agnostic (safe under any reference method) but it's also process-local and keyed to the image, so after a ComfyUI restart everything re-encodes, and if you swap a reference you should hit clear_cache_before_run or you'll keep getting the old latent. On FLUX.2-dev, more references mean more memory and slower runs - ten slots is the ceiling, not the target. Most people live at two or three.
Inputs (31)
| Name | Type | Default | Description |
|---|---|---|---|
| positive | CONDITIONING | — | |
| negative | CONDITIONING | — | |
| vae | VAE | — | |
| apply_to | COMBO | positive_and_negative | Attach the same native reference-latent sequence to positive conditioning, negative conditioning, or both. |
| reference_latents_method | COMBO | do_not_set | Optional equivalent of ComfyUI's native Edit Model Reference Method node. |
| slot_count | INT | 21–10 | Number of visible reference-image slots. The backend ignores every slot above this count. |
| enabled_1 | BOOLEAN | true | When disabled, this slot is omitted before image validation, cache lookup, VAE encoding, or conditioning. |
| enabled_2 | BOOLEAN | true | When disabled, this slot is omitted before image validation, cache lookup, VAE encoding, or conditioning. |
| enabled_3 | BOOLEAN | true | When disabled, this slot is omitted before image validation, cache lookup, VAE encoding, or conditioning. |
| enabled_4 | BOOLEAN | true | When disabled, this slot is omitted before image validation, cache lookup, VAE encoding, or conditioning. |
| enabled_5 | BOOLEAN | true | When disabled, this slot is omitted before image validation, cache lookup, VAE encoding, or conditioning. |
| enabled_6 | BOOLEAN | true | When disabled, this slot is omitted before image validation, cache lookup, VAE encoding, or conditioning. |
| enabled_7 | BOOLEAN | true | When disabled, this slot is omitted before image validation, cache lookup, VAE encoding, or conditioning. |
| enabled_8 | BOOLEAN | true | When disabled, this slot is omitted before image validation, cache lookup, VAE encoding, or conditioning. |
| enabled_9 | BOOLEAN | true | When disabled, this slot is omitted before image validation, cache lookup, VAE encoding, or conditioning. |
| enabled_10 | BOOLEAN | true | When disabled, this slot is omitted before image validation, cache lookup, VAE encoding, or conditioning. |
| cache_enabled | BOOLEAN | true | Use the bounded CPU reference-latent cache to avoid repeated VAE encoding of unchanged prepared images. |
| cache_max_entries | INT | 320–256 | — |
| cache_max_cpu_mb | INT | 2560–4096 | — |
| clear_cache_before_run | BOOLEAN | false | Clear the shared reference-latent cache first. |
| diagnostics | BOOLEAN | true | — |
| reference_image_1opt | IMAGE | — | |
| reference_image_2opt | IMAGE | — | |
| reference_image_3opt | IMAGE | — | |
| reference_image_4opt | IMAGE | — | |
| reference_image_5opt | IMAGE | — | |
| reference_image_6opt | IMAGE | — | |
| reference_image_7opt | IMAGE | — | |
| reference_image_8opt | IMAGE | — | |
| reference_image_9opt | IMAGE | — | |
| reference_image_10opt | IMAGE | — |
Outputs (14)
| Name | Type | Description |
|---|---|---|
| positive | CONDITIONING | — |
| negative | CONDITIONING | — |
| vae | VAE | — |
| reference_image_1 | IMAGE | — |
| reference_image_2 | IMAGE | — |
| reference_image_3 | IMAGE | — |
| reference_image_4 | IMAGE | — |
| reference_image_5 | IMAGE | — |
| reference_image_6 | IMAGE | — |
| reference_image_7 | IMAGE | — |
| reference_image_8 | IMAGE | — |
| reference_image_9 | IMAGE | — |
| reference_image_10 | IMAGE | — |
| diagnostics_json | STRING | — |