Nodes/Doom_Flux_NodePack/Doom Flux2 I2I Sampler
ComfyUI Node

Doom Flux2 I2I Sampler

Flux.2 edits with up to eight reference images — and the inputs grow as you connect them

By PeterMikhai·Created about a year ago·Updated 6 days ago· 1
Doom Flux2 I2I Sampler
  • model
  • vae
  • conditioning
  • images
  • mask
  • output
  • denoised_output
noise_seed0
steps20
denoise1.00
sampler_nameeuler
guidance4.0
batch_size1
use_empty_latentfalse
empty_width1024
empty_height1024

Doom Flux2 I2I Sampler is the pack's img2img and multi-reference sampler for Flux.2 - the node you reach for when the job is "change this image / make something from these references" rather than "dream from nothing." It does the two things Flux.2 made famous in one node: single-image editing, and multi-reference composition where several reference images are injected into the conditioning as reference_latents. Flux.2's multi-reference editing is one of the few things from its launch that the community genuinely, unreservedly praised (see the KB's flux-2 doc) - and this node exposes it directly.

The other notable feature is UI-level: the reference inputs are autogrow. Connect an image to image_1 and the node grows inputs for image_2, image_3, and so on as you connect them, up to eight or so in practice. No fixed slots to plan around.

How it works

The reference wiring is the mechanism worth understanding:

  • image_1 is the main image - the one encoded into the latent you start from (when use_empty_latent is off). If you're doing img2img, this is your source.
  • image_2..N are references - each is VAE-encoded and appended to reference_latents in the conditioning, which is how Flux.2 knows the visual context you want echoed without overwriting the main latent. This is the multi-reference path.
  • mask is optional and 1 = regenerate: it becomes the latent's noise mask, so you can restrict regeneration to a region of the main image.
  • use_empty_latent (default false) flips the node into text-to-image-with-references mode: start from an empty latent of empty_width × empty_height instead of from an encoded main image.

denoise controls how much of the starting latent survives - 1.0 is full resample, and anything below that is partial re-sampling, which is your lever for "change the vibe but keep the structure." guidance (default 4.0) is the distilled guidance embedding, single-pass CFG 1, so no negative prompt input here either. The Flux.2 schedule is built by sequence length, and shift handling matches the base sampler.

Inputs you'll actually set: model, vae (the 16-channel Flux.2 VAE - the tooltip says so explicitly), conditioning, noise_seed, steps, denoise, the autogrow images, optional mask, and use_empty_latent if you're in reference-only mode. Outputs: output and denoised_output latents, decoded externally.

Installing it

cd ComfyUI/custom_nodes
git clone https://github.com/PeterMikhai/Doom_Flux_NodePack

Restart or use ComfyUI Manager. No extra deps; needs current ComfyUI (V3 API). README's DoomAI_nodes.git line is stale - use Doom_Flux_NodePack. Note that the pack's flux2_i2i_reference_pages example workflow uses a subgraph prompt enhancer and needs ComfyUI 0.24+.

Common issues

  • The reference has no visible effect. image_2..N feed context via reference_latents; if you connected them but left use_empty_latent off, the main latent still dominates. Multi-reference shine is when you want composition from references - flip use_empty_latent on.
  • "I expected inpainting, got a full re-imagine." Without a mask, img2img with high denoise redraws everything. Add the mask (1 = regenerate) or drop denoise.
  • Images must be the right aspect for the latent - a very different-ratio reference into a square latent produces odd compositions; normalize sizes upstream (the pack's DoomImageResize handles this).
  • Needs the Flux.2 VAE - 16-channel. Wrong VAE, wrong colors.

If Flux.2 is your edit/companion model, this is the node you'll actually live in.

CategoryDoom/Sampler

Inputs (14)

NameTypeDefaultDescription
modelMODEL
vaeVAEVAE Flux.2 (16-канальный)
conditioningCONDITIONING
noise_seedINT00–18446744073709550000
stepsINT201–10000
denoiseFLOAT1.000–1Сила шума (1.0 — с нуля; <1 — частичный ресемпл)
sampler_nameCOMBOeuler44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
guidanceFLOAT4.00–100
batch_sizeINT11–4096
use_empty_latentBOOLEANfalsetrue — стартовать с пустого латента (без main_image)
empty_widthINT102416–8192
empty_heightINT102416–8192
imagesoptCOMFY_AUTOGROW_V3Референсы: image_1 — основной (энкодится в латент), image_2..N — в reference_latents. Новые входы появляются по мере подключения.
maskoptMASKМаска inpaint (1 — перегенерировать)

Outputs (2)

NameTypeDescription
outputLATENT
denoised_outputLATENT