ComfyUI Node

Flux 2 Sampler

The whole Flux.2 pipeline collapsed into one node

By Stibo·Created 7 months ago·Updated 7 days ago· 11
Flux 2 Sampler
  • model
  • conditioning
  • latent_image
  • sampler
  • latent
  • time
◄noise_seed0►
◄steps20►
◄guidance3.5►
◄sampler_name▾►
◄width1024►
◄height1024►

Flux.2 is a monster: a 32B rectified-flow transformer paired with a Mistral-3 24B vision-language encoder, so 56B of weights and a video-card's worth of VRAM in the full 4B-parameter-actual sense. It's also, in the community's reckoning, the strongest open-weights image model that almost nobody made their daily driver - 32 billion parameters was "rough," said the thread, and Alibaba's 6B Z-Image took the local default instead. Klein arrived in January 2026 and reopened the consumer fight at ~13GB.

Whatever checkpoint you're running, the wiring for Flux.2 in ComfyUI is six nodes: FluxGuidance, a BasicGuider, a KSamplerSelect, a Flux2Scheduler, an Empty Flux 2 Latent, and SamplerCustomAdvanced. This node is all six in one box.

How it works

Reading the source, execute() does exactly what the six-node chain does, in order:

  1. It embeds your guidance value into the conditioning - the same thing FluxGuidance does - so the conditioning you feed it should be plain, un-guided text.
  2. It builds a basic guider: positive conditioning only, no negative. That's not an omission, it's Flux.2's design. Guidance-distilled models don't use CFG.
  3. It picks the sampler from the SAMPLER input if you connected one, otherwise constructs it from sampler_name.
  4. With no latent_image, it creates an empty latent at width × height - 128 channels at a 16× downscale, which is Flux-family territory, not SDXL's 4.
  5. It computes the sigma schedule with the Flux.2 shift: an empirically derived mu from the sequence length and step count, then a generalized time-SNR shift. Small latent, different shift - which is why a plain KSampler schedule doesn't feel the same.
  6. It samples, with the preview callback wired up so you still get the usual step previews.

Then it hands back the latent, plus the time output: wall-clock milliseconds for the sampling call only, extrapolated from per-step timings. Model loading and VAE decode are excluded, so it's a clean number for comparing steps-to-steps rather than a full generation timer.

Inputs and outputs

The ones that matter:

  • model - your Flux.2 checkpoint, loaded and patched however you normally do it (fp8, GGUF, whatever fits).
  • conditioning - positive conditioning, no guidance baked in. If you pre-apply FluxGuidance you're baking it twice.
  • steps - default 20. Match this to your checkpoint: the Klein distilled checkpoints are 4-step models, and running one at 20 steps is just a slower way to get the same picture.
  • guidance - default 3.5, the classic Flux.1-dev value. For Flux.2, start from whatever the checkpoint card recommends and treat this as the fine-tuning knob.
  • noise_seed - with the usual control-after-generate dropdown attached.
  • width / height - default 1024×1024, step 16. Per the tooltip they feed the empty latent and the sigma schedule when no latent is connected.
  • sampler_name - the fallback sampler when the optional sampler input is empty.

Optional: latent_image (img2img / refinement - connect and the node denoises your latent instead of an empty one) and sampler (a SAMPLER wire, which overrides the dropdown).

Outputs: latent, ready for VAE Decode, and time in milliseconds. Wire time into a preview node if you're comparing step counts; that's better data than vibes.

Installing it

ComfyUI Manager → search Nifty Nodes, or:

cd ComfyUI/custom_nodes
git clone https://github.com/Stibo/comfyui-nifty-nodes

Restart. The pack declares color-matcher and imageio-ffmpeg; this node needs neither, and no models of its own - it works with whatever Flux.2 checkpoint and text encoder you've already set up. The pack is built on ComfyUI's V3 node API, so a source with no NODE_CLASS_MAPPINGS is expected.

Two README caveats worth repeating: the pack is tested against frontend 1.39, and explicitly marked experimental where Flux 2 Sampler is concerned. Also note that the node relies on Flux2Scheduler-compatible internals, so an older ComfyUI without Flux.2 support isn't going to be rescued by installing the pack.

Where people get burned

  • Double guidance. The most common mistake: leaving a FluxGuidance node upstream "because the tutorial had one." The conditioning arrives pre-guided, this node adds its own, and you get flat or burnt output with no error.
  • Hunting for the CFG slider. There isn't one. No negative prompt, no CFG - wire a negative into it if you like, it's ignored. That's the architecture, not a missing feature.
  • Wrong steps for the checkpoint. 20 steps on a 4-step distilled Klein is wasted compute; 4 steps on an undistilled Dev is a blurry mess.
  • Non-multiple-of-16 dimensions. width/height step by 16 in the widget, so the UI mostly protects you - but a latent fed in from elsewhere with odd dimensions will not be so kind.
  • Reading time as a full-generation timer. It measures sampling only, which is exactly what you want for a steps comparison and misleading if you're benchmarking the whole workflow.
Categorysampling/custom_sampling

Inputs (10)

NameTypeDefaultDescription
modelMODELModel to sample with.
conditioningCONDITIONINGPositive conditioning, without guidance embedded yet. The node embeds the guidance widget value into it internally (same as FluxGuidance) before sampling.
noise_seedINT00–1125899906842624Seed for noise generation.
stepsINT201–4096Number of sampling steps.
guidanceFLOAT3.50–100Flux guidance embed strength.
sampler_nameCOMBOSampler used when no sampler input is connected.
widthINT102416–16384Latent width. Used for the sigma schedule only if latent_image is unconnected.
heightINT102416–16384Latent height. Used for the sigma schedule only if latent_image is unconnected.
latent_imageoptLATENTLatent to denoise. If unconnected, an empty latent is generated from width/height.
sampleroptSAMPLERSampler override. If unconnected, sampler_name is used instead.

Outputs (2)

NameTypeDescription
latentLATENT—
timeINTWall-clock duration of the sampling call only, in milliseconds.