Nodes/Diztraido Nodes/Flux Sampler
ComfyUI Node

Flux Sampler

The entire sampling stage in one node — width, height, scheduler, decode and all

By jadervasque·Created 2 months ago·Updated 2 months ago· 0
Flux Sampler
  • model
  • positive
  • negative
  • vae
  • image
  • latent
noise_seed0
cfg4.0
sampler_nameeuler
steps50
aspect_ratio1:1 (Square)
megapixels1.0
multiple8
width1024
height1024
batch_size1
decode_imagetrue

A stock Flux.2 sampling stage is five or six nodes: RandomNoise, a guider, KSamplerSelect, a scheduler, an empty-latent node, SamplerCustomAdvanced, and a VAEDecode on the far side. Flux Sampler (class DiztraidoProcessingBundle) replaces that whole block with one node. Feed it a model, positive and negative conditioning, and (optionally) a VAE, and it returns an image and the raw latent. If the pack's loaders shrink the front of a Flux graph, this is what shrinks the middle.

The important thing to know before you reach for it: the pipeline inside is Flux.2-native. It calls ComfyUI's RandomNoise, CFGGuider, KSamplerSelect, Flux2Scheduler, EmptyFlux2LatentImage, SamplerCustomAdvanced, and optional VAEDecode - the Flux2Scheduler and EmptyFlux2LatentImage nodes are the ones ComfyUI added specifically for Flux.2/Klein. So this isn't a generic KSampler substitute; it's a sampler for the Flux.2 family (dev and Klein), and if you use it with a Flux.1 model you're likely to get odd results. It also fuses in the pack's resolution math: the aspect_ratio and megapixels inputs compute width/height for you using the same logic as the pack's Resolution Selector, rounded to the multiple you set.

The inputs that matter

  • model, positive, negative - the standard trio from your loaders and text encoding. For Flux.2, negative is typically a blank conditioning; the guidance lives in the schedule, not CFG.
  • noise_seed, steps, cfg (default 4.0), sampler_name (default euler, from the full sampler list) - familiar KSampler territory. The Flux2Scheduler sets the schedule from steps, so sampler and steps are the main dials.
  • aspect_ratio, megapixels, multiple - the resolution selector trio. Pick an aspect ratio and a megapixel target (1.0 = 1024²), and width/height get computed and rounded to multiple (default 8).
  • width / height - only used when aspect_ratio is Custom.
  • batch_size - how many images per run.
  • decode_image - on by default. Turn it off to skip VAE decoding if you only need the latent.

Optional: vae. It's lazy-loaded, and here's the gotcha: if decode_image is on and you use the image output, you must connect a VAE or the node raises a clear error ("Connect a VAE to Flux Sampler…"). If you only use the latent output, you can leave it disconnected and the pack won't touch the VAE at all.

Outputs: image (IMAGE) and latent (LATENT). latent is great for chaining to an upscaler for a second pass.

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 ComfyUI's native sampling nodes, which means it needs a reasonably current ComfyUI (the Flux.2-native scheduler and latent nodes are newer additions).

Common issues

Three things to watch. First, the VAE requirement above - the error message tells you exactly what to do, but it's the most common stumble on first use. Second, Flux2Scheduler is tuned for Flux.2 dev; Klein is guidance-distilled and behaves differently, so if your Klein output looks off on the default schedule, the community answer is a custom/Klein-tuned schedule, not cranking CFG. Third, because the node computes resolution from aspect ratio + megapixels, your width/height widgets are ignored unless you're in Custom mode - if you change width and nothing happens, that's why. And remember the resolution math only guarantees multiples of multiple; for Flux, keeping dimensions at multiples of 16 (or 32 for some quantizations) is still a good habit.

CategoryDiztraido/flux

Inputs (15)

NameTypeDefaultDescription
modelMODEL
positiveCONDITIONING
negativeCONDITIONING
noise_seedINT00–9223372036854776000
cfgFLOAT4.00–100
sampler_nameCOMBOeuler44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
stepsINT501–10000
aspect_ratioCOMBO1:1 (Square)23 options: 1:1 (Square), 2:3 (Portrait Photo), 3:2 (Photo), 3:4 (Portrait Standard), 4:3 (Standard), 9:16 (Portrait Widescreen), +17
megapixelsFLOAT1.00.1–16
multipleINT88–128
widthINT10248–16384
heightINT10248–16384
batch_sizeINT11–4096
decode_imageBOOLEANtrue
vaeoptVAE

Outputs (2)

NameTypeDescription
imageIMAGE
latentLATENT