SPEED Sampler (Nukun)
Denoise small, expand to full res along the way
- SAMPLER
SPEED is a training-free sampling trick: start denoising at a lower latent resolution and spectrally expand to full resolution during the trajectory, instead of denoising at full res the whole time. Fewer pixels early on, same pixels at the end - that's where the runtime win comes from, and it's why this node exists. It's an adaptation of the MIT-licensed howardhx/speed project (Spectral Progressive Diffusion for Efficient Image and Video Generation), implemented directly in this pack with no separate ComfyUI-SPEED install needed.
The honest caveat up front: it's a speed/quality trade, and the README says it plainly - use it when your workflow is sampler-bound and you can inspect results for artifacts; use a normal sampler when exact stability matters more than speed. On FLUX-class T5 models the spectral expansion is generally well tolerated; on pickier bases you'll see resolution-jump artifacts.
How it works
The node outputs a SAMPLER for SamplerCustomAdvanced. Instead of replacing the sampler math outright, it wraps the chosen base_sampler (default euler) and runs it over a schedule of scale ratios. The key inputs:
transform-dct(default),fft, ordwt.dctis the safest for arbitrary scale ratios;fftalso accepts arbitrary ratios;dwtrequires each adjacent scale jump to be exactly 2× (like0.25,0.5,1.0).mode-delta_optimal(default) computes transition timing from the spectrum;manualuses yourmanual_sigmaslist.model_preset-flux,wan21,anima_manual, orcustom. This sets the spectrum parameters (spectrum_A,spectrum_beta) that drive when each scale activates.scales- comma-separated scale ratios, must end at 1.0. Default0.5,1.0.delta- the optimality parameter (default 0.01), must be < 1.0.
The two cryptic floats, spectrum_A (default 203.615097) and spectrum_beta (1.915461), are the flux preset's power-spectrum constants - you only touch them under custom.
Recommended starting points
- General/FLUX:
dct,delta_optimal,flux,scales=0.5,1.0,delta=0.01. - WAN 2.1-style experiments: same, but
model_preset=wan21. - Anima/manual:
mode=manual,model_preset=anima_manual,scales=0.5,0.75,1.0,manual_sigmas=0.8,0.7.
Installing it
Standard pack install:
cd ComfyUI/custom_nodes
git clone https://github.com/OnekoSL/Nukun_ComfyUI_Nodes.git
Restart, or use Manager (search "Nukun"). The transform math needs scipy and PyWavelets, both already in the pack's requirements.txt. Wire the SAMPLER output into SamplerCustomAdvanced (or one of the pack's sampler nodes) and you're off.
Common issues
The validation errors are your friend here, and they're strict by design: scales must be strictly increasing and end at 1.0, delta must be < 1.0, manual_sigmas must be strictly decreasing in (0,1). The most common real-world failure is using dwt with non-2× jumps - it errors on purpose, so if you see "every scale must be in (0, 1]" or a dwt scale error, that's the fix. And don't expect a miracle: the speedup shows on large images and sampler-bound steps; on small canvases or already-fast samplers you may not notice, and you're paying a small artifact risk for nothing. A/B against your normal sampler before adopting it.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| base_sampler | COMBO | euler | Underlying k-diffusion sampler used within each SPEED segment. |
| transform | COMBO | dct | Spectral basis for expansion. DCT is safest for arbitrary scale ratios. |
| mode | COMBO | delta_optimal | delta_optimal computes transition points; manual uses manual_sigmas. |
| model_preset | COMBO | flux | Power-spectrum preset. anima_manual is intended for manual mode. |
| scales | STRING | 0.5,1.0 | Comma-separated resolution scales ending at 1.0. Anima suggestion: 0.5,0.75,1.0. |
| delta | FLOAT | 0.0100.0001–0.5 | Noise-dominated tolerance for delta_optimal mode. Smaller values transition later. |
| manual_sigmas | STRING | 0.85 | Comma-separated decreasing sigma thresholds. Anima suggestion: 0.8,0.7. |
| spectrum_A | FLOAT | 203.6150–1000000 | Power-spectrum amplitude used with model_preset=custom. |
| spectrum_beta | FLOAT | 1.9150–10 | Power-spectrum decay exponent used with model_preset=custom. |
| seed | INT | 00–2147483647 | Seed for spectral-noise padding at each transition. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| SAMPLER | SAMPLER | — |