Nodes/comfyui-diversityboost/Diversity Boost (V3)
ComfyUI Node

Diversity Boost (V3)

Your Turbo model makes the same picture every seed. Diversity Boost (V3) fixes that.

By facok·Created 5 months ago·Updated 4 months ago· 30
Diversity Boost (V3)
  • model
  • model
strength2.00
clamp0.5
noise_typepink
dc_preserve0.0
energy_compensatefalse
hf_factor1.00
lf_factor0.30
transition2.0
schedulelinear

You know the feeling: you roll a new seed on Z-Image Turbo or FLUX2.[Klein] and get the same portrait, same horizon line, same dead-center subject, over and over. That's not bad luck - it's composition collapse, a known side effect of step-distilled models. The speed comes from collapsing the whole denoising trajectory into a few big jumps, and in the process the model locks onto one "average" composition per prompt regardless of the noise you feed it. The community has griped about this on Z-Image Turbo since day one. Diversity Boost (V3) is the training-free fix: a single node that makes different seeds actually produce different layouts again.

It's a model patch, not a modifier or a sampler. You drop it in between your checkpoint loader and the KSampler, it clones your model, installs a post-CFG hook, and hands the patched model back out. No extra dependencies, no model files to download, no retraining. You wire MODEL -> Diversity Boost (V3) -> MODEL -> KSampler and you're done.

How it actually works

The author's theory (and it's a good one): distillation freezes the spatial distribution of token norms across seeds, so every seed reconstructs from the same "average" latent structure. The hook fixes that in two moves, both applied to the denoised latent at step 0:

  1. Polynomial frequency modulation - a smooth attenuation of high-frequency amplitude in the frequency domain, normalized per token-grid via the DiT patch size so it's resolution-independent. Near-DC frequencies are protected, which keeps brightness and color from drifting.
  2. DCT composition push - it synthesizes a random 4×4 low-frequency spatial field (pink/white/blue noise weighted, zero-DC, unit std), scales it by strength, and multiplies it into the result. That per-seed random push is what nudges the model onto a different composition path.

The model then freely reconstructs coherent details in the remaining steps, with the per-seed noise driving different paths. Because it all happens at step 0, the model has plenty of runway to recover - which is why it stays clean where earlier diversity hacks got blurry.

The inputs that matter

There are ten, but you'll touch about four.

  • strength (default 2.0) - how hard the composition push lands. 0 = HF cleanup only, no push; 0.5 = subtle; 1.0 = moderate; 2.0 = strong. Start at the default, it's tuned to be aggressive without side effects.
  • schedule - flat (step 0 only, safe with every sampler), or linear/cosine (HF attenuation decays across the first ~3 steps). This is the trap: the default is linear, and it's only safe with second-order samplers like res_2m or heunpp2. If you're on first-order euler, switch to flat or you'll get incomplete denoising.
  • noise_type - pink (default), white, or blue spectral weighting for the random field. Pink boosts low-frequency composition modes; that's why it's the default.
  • hf_factor - high-frequency attenuation, 0–1. 1.0 zeroes HF fully; drop to ~0.5–0.7 for a gentler touch.

The rest are set-and-forget: clamp bounds the multiplicative scale, dc_preserve trades diversity for original brightness (0 = max diversity), lf_factor amplifies low frequencies, transition shapes the polynomial curve, and energy_compensate rescales output RMS to match the input. Output is a single MODEL that feeds straight into your sampler.

Install

ComfyUI Manager is the easy route - search "comfyui-diversityboost" and hit install. Otherwise:

cd ComfyUI/custom_nodes
git clone https://github.com/facok/ComfyUI-DiversityBoost.git

Restart ComfyUI. That's genuinely it: no pip installs, no requirements beyond PyTorch, which ComfyUI already ships. The author has tested it on FLUX2.[Klein] 9B and z-image-turbo.

Where people get burned

  • Euler + linear schedule. The single most common footgun. First-order samplers are sensitive to denoised modification past step 0; use flat.
  • Not enough push. If you set strength low and still see identical layouts, you've basically disabled the point of the node - the push is what creates per-seed variety, not the HF cleanup.
  • It won't help full models. If your model isn't distilled (or is a de-distilled variant), you don't have composition collapse, so this is fixing a problem you don't have. Reach for it with Turbo/step-distilled checkpoints only.

It plays nice with other patches like ControlNet - it operates on a different hook than most, so you can stack them. If you're farming seeds on a distilled model, this is the difference between rolling twenty identical portraits and actually getting variety to pick from.

Categorysampling

Inputs (10)

NameTypeDefaultDescription
modelMODEL
strengthFLOAT2.000–2Composition push amplitude. 0 = cleanup only. 1.0 = moderate. 2.0 = strong.
clampFLOAT0.50.1–3Safety clamp for DCT field values.
noise_typeCOMBOpinkFrequency spectrum of random DCT coefficients. pink = stronger composition push (recommended).
dc_preserveFLOAT0.00–1DC amplitude preservation (1.0 = keep, 0.0 = zero). Only affects step 0; step 1+ always preserves full DC.
energy_compensateBOOLEANfalseRescale output energy to match original.
hf_factorFLOAT1.000–1High-frequency attenuation [0, 1]. 1.0 = full attenuation. Only used in polynomial mode.
lf_factorFLOAT0.300–1Low-frequency amplification [0, 1]. 1.0 = +50% boost. Only used in polynomial mode.
transitionFLOAT2.00.5–4Polynomial transition shape. 0.5 = steep, 1.0 = linear, 2.0 = smooth, 4.0 = very smooth.
scheduleCOMBOlinearTimestep schedule. flat = step 0 only. linear/cosine = progressive decay.

Outputs (1)

NameTypeDescription
modelMODEL