Diversity Boost
The legacy Butterworth node V3 replaced (and when to keep it)
- model
- model
This is the older half of the ComfyUI-DiversityBoost pack. Distilled models like Z-Image Turbo and FLUX2.[Klein] are fast, but they suffer from composition collapse - different seeds produce near-identical layouts, so a portrait always lands dead-center and a landscape always uses the same horizon. Diversity Boost (class DiversityBoostCore, display name "Diversity Boost") was the original training-free fix for that: a post-CFG hook that attenuates high frequencies and then pushes a random low-frequency field into the latent at step 0, nudging each seed down a different composition path.
The author now recommends the newer Diversity Boost (V3) node from the same pack - same idea, but the V3's polynomial frequency modulation is smoother and resolution-independent where this one uses a legacy Butterworth low-pass filter. So why are you here? Because old workflows exist, and this node exists purely so they keep working. If a saved workflow from before the V3 upgrade loads DiversityBoostCore, it'll still run without you rebuilding anything.
How it differs from V3
Same hook, same two-step recipe: HF attenuation first, then a multiplicative DCT composition push on the cleaned signal. The difference is the filter. This node uses a Butterworth LPF - a steep, sharp frequency cliff (order-12 in the source) - where V3 uses a smooth polynomial curve. And where V3 gates its decay with hf_factor, lf_factor, and a schedule, this one hands you a single n_periods knob for the filter cutoff instead.
The inputs
Six plus the model in/out. The ones you'll actually set:
- strength (default 0.5) - composition push amplitude. Note it defaults lower than V3's 2.0, so don't expect the same aggression out of the box. 0 = cleanup only; 0.5 = moderate; 1.0 = strong.
- n_periods (default 2) - the Butterworth cutoff, in spatial periods to preserve. 2 is the sweet spot; raise it if the push is eating structure you want kept.
- noise_type - pink (default) / white / blue spectrum for the random DCT coefficients. Pink gives the stronger composition push; leave it.
- clamp (default 1.0) - safety clamp on the DCT field values, so the push can't blow up brightness.
dc_preserve (0 = max diversity, 1 = keep original brightness) and energy_compensate (rescale output RMS to match the input) round it out. It takes one MODEL in and returns one MODEL out, ready for the KSampler.
Install and use
It ships in the same pack as V3, so the steps are identical - ComfyUI Manager, search "comfyui-diversityboost", install and restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/facok/ComfyUI-DiversityBoost.git
No extra dependencies beyond PyTorch, which ComfyUI already has, and no model downloads. Both nodes install together; you just pick which class to drop in.
Gotchas
- The old one is only a step-0 patch. Like V3, the push happens at step 0 only, so it stays safe with first- and second-order samplers alike - but you get none of V3's
linear/cosineprogressive HF decay into early steps. If you want that stronger-diversity behavior, that's exactly what V3'sscheduleparameter is for. - Defaults are conservative.
strength0.5 andclamp1.0 give a modest nudge. If you're coming from V3's punchy defaults and the legacy node feels weak, that's by design - the old node was tuned gentler. - V3 exists for a reason. There's no real reason to start a new workflow on this node. Keep it for compatibility, not because it's better.
One light aside: if your workflow predates the V3 rewrite, this node is the reason it still opens cleanly. Appreciate it, then consider migrating to the V3 when you next rebuild.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| strength | FLOAT | 0.500–2 | Composition push amplitude. 0 = cleanup only. 0.5 = moderate. 1.0 = strong. |
| clamp | FLOAT | 1.00.1–3 | Safety clamp for DCT field values. |
| noise_type | COMBO | pink | Frequency spectrum of random DCT coefficients. pink = stronger composition push (recommended). |
| n_periods | INT | 21–10 | Butterworth cutoff. 2 = preserves DCT signal. |
| dc_preserve | FLOAT | 0.00–1 | DC amplitude preservation (0 = max diversity). |
| energy_compensate | BOOLEAN | false | Rescale output energy to match original. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| model | MODEL | — |