ComfyUI custom node, Forge Neo (sd-webui-forge-classic) extension, and SwarmUI extension for SPEED — Spectral Progressive Diffusion for faster sampling. Progressively expands the latent resolution during denoising, reducing computation while preserving visual quality.
Official code: https://github.com/howardhx/speed
Key references:
- Project page: https://howardxiao.ca/speed/
- Paper (PDF): https://howardxiao.ca/speed/paper/paper.pdf
- arXiv: https://arxiv.org/abs/2605.18736
Workflow:
| SPEED sampler (this node) | Baseline (euler sampler) |
|---|---|
mode=delta_optimal model_preset=flux scales=0.5,1.0 delta=0.01 transform=dct base_sampler=euler![]() 20s 1.33x faster |
![]() 26.5s 1.00x |
- Place this folder under your ComfyUI
custom_nodesdirectory, then restart ComfyUI. - Connect the Sampler SPEED (Spectral Progressive Diffusion) output to SamplerCustomAdvanced.
The same repo doubles as a webui extension — the shared math lives in speed_core.py, the webui integration in scripts/speed_forge.py.
- Place (or
git clone) this folder under the webuiextensions/directory and restart the webui. - Open the SPEED (Spectral Progressive Diffusion) accordion under the generation parameters and enable it.
- Generate. The sampler selected in the main Sampling method dropdown is used as the base solver; SPEED segments its sigma schedule and expands the latent at each transition.
Notes for the webui version:
- Designed for flow-matching models (Flux, Wan, …) whose sigmas are in
(0, 1]. eps-prediction models (SD1.x/SDXL) run but are unvalidated; inmanualmode thresholds above 1.0 are accepted for such schedules. - Inpainting is automatically skipped (masks and inpaint image conditioning are tied to the full latent resolution).
- The hires-fix pass is untouched unless "Apply to hires-fix pass" is checked.
- Brownian-noise samplers (DPM++ SDE family) work, but their pre-built noise sampler is only used on the full-resolution segment; coarse segments fall back to the sampler's default noise.
- The
dwttransform needs the optionalPyWaveletspackage (pip install PyWaveletsinto the webui venv);dct(default) andffthave no extra dependencies. - If a transition threshold is never reached (too few steps / too small
delta), the console warns and the output stays at the coarse resolution — increase steps ordelta. - Settings are recorded in the image infotext under the
SPEED:key.
The same repo also works as a SwarmUI extension — the C# integration lives in SPEEDSamplerExtension.cs, and SwarmUI's portable ComfyUI backend runs the SamplerSPEED node from this repo.
git clonethis repo into SwarmUI'ssrc/Extensions/directory (e.g.src/Extensions/ComfyUI-SPEED/), then run SwarmUI'supdatescript (or launch withlaunch-dev) so the extension compiles.- In the Generate tab, enable Display Advanced Options, find the SPEED parameter group, and toggle it on. If the ComfyUI-SPEED node pack isn't installed on the backend yet, click the Install SPEED button inside the group (this clones this same repo into the backend's
custom_nodesand restarts it). - Generate. The main Sampler parameter is used as the base solver.
Notes for the SwarmUI version:
- When SPEED is enabled, the main sampling node is rebuilt as a
SamplerCustomAdvanced+SamplerSPEEDgraph. Swarm-specific sampler features — Variation Seed and tiled sampling — do not apply while SPEED is on, and live previews may behave differently. - Swarm-custom schedulers (
align_your_steps,flux2,ltxv,ideogram4, ...) can't be rebuilt from stock Comfy nodes; SPEED falls back tosimplefor those (with a log warning).turbo,karras, and all standard Comfy schedulers are reproduced faithfully. - Masked generations (inpainting / regional masks) are automatically skipped, and the Refiner stage is untouched.
- The base Sampler must be a k-diffusion sampler (Euler, DPM++ 2M, etc.). Exotic non-k-diffusion samplers (
ddim,uni_pc,res_multistep) are rejected by the node with a clear error — pick another sampler. - The SPEED parameters are recorded in the image metadata like all Swarm params.
| Input | Type | Default | Description |
|---|---|---|---|
base_sampler |
combo | euler |
Underlying ODE solver. Any comfy.k_diffusion.sampling sampler supported. |
transform |
combo | dct |
Spectral basis for expansion: dct (any ratio), dwt (2× only), fft (any ratio). |
mode |
combo | delta_optimal |
delta_optimal computes transitions from the power-spectrum preset. manual uses user-specified sigma thresholds. |
model_preset |
combo | flux |
Power-spectrum preset: flux, wan21, or custom (use spectrum_A / spectrum_beta). |
scales |
string | 0.5,1.0 |
Comma-separated resolution fractions ending at 1.0. e.g. 0.25,0.5,1.0. |
delta |
float | 0.01 |
Noise-dominated tolerance (Eq. 9). Smaller values delay transitions. |
manual_sigmas |
string | 0.85 |
Comma-separated sigma thresholds (one per transition). Used in manual mode. |
spectrum_A |
float | 203.615 |
Power-law amplitude (used when model_preset=custom). |
spectrum_beta |
float | 1.915 |
Power-law decay exponent (used when model_preset=custom). |
seed |
int | 0 |
Seed for spectral-noise padding at each transition. |
Set model_preset to flux or wan21 and adjust scales and delta. Transition timing is computed automatically from the VAE power spectrum using Eq. 9 and Eq. 10 of the paper.
Set mode=manual and supply comma-separated sigma thresholds in manual_sigmas (one per transition between adjacent scales). Sigma decreases as denoising progresses, so the first threshold should be larger than the last (e.g. 0.95,0.85 for three scales).
This implementation is based on and derived from the official SPEED repository by Howard Xiao et al.:
- Official code: https://github.com/howardhx/speed (BSD 3-Clause)
- Paper: Xiao, H., Chao, B., Yariv, L., & Wetzstein, G. (2026). Spectral Progressive Diffusion for Efficient Image and Video Generation.
Please see the original project page and repository for full authorship, details, and license information.
@article{xiao2026spectral,
author = {Xiao, Howard and Chao, Brian and Yariv, Lior and Wetzstein, Gordon},
title = {Spectral Progressive Diffusion for Efficient Image and Video Generation},
year = {2026},
}


