feat: add SPEED (Spectral Progressive Diffusion) sampler#1761
Draft
fszontagh wants to merge 4 commits into
Draft
feat: add SPEED (Spectral Progressive Diffusion) sampler#1761fszontagh wants to merge 4 commits into
fszontagh wants to merge 4 commits into
Conversation
Owner
|
Thanks for the PR. The idea is interesting, but I don’t think it’s worth merging into master for now. The visual quality is not very convincing to me, and the practical speedup also seems limited when compared with existing cache or Turbo LoRA workflows. At the same time, this adds quite a bit of extra code and maintenance burden for a sampler that may only be useful in some specific cases. I’d prefer to keep this as experimental for now rather than merge it into the main branch. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
speed_flow- the SPEED (Spectral Progressive Diffusion) sampler from arXiv:2605.18736. Runs the early steps of a flow model at reduced spatial resolution, expands to full resolution via a DCT spectral basis at scheduled transitions, and rescales the flow-matching time (paperkappa, Eqs. 5-6) so the base sampler continues cleanly. Training-free; works with any pretrained flow model.Sampling-time speedups over
eulerat same seed / step count:speed_scales=0.5:1.0speed_scales=0.5:1.0speed_scales=0.5:1.0,speed_manual_sigmas=0.7Related Issue / Discussion
Closes #1756.
Reference impl: howardhx/speed, ruwwww/ComfyUI-SPEED.
Additional Information
What's in the PR
sd::Tensor<float>(src/core/spectral_ops.hpp).src/runtime/speed_sampler.hpp).stable-diffusion.cpp:2534so the auto-created ones-mask doesn't crash when x is downscaled.docs/speed_sampler.md; pointer indocs/performance.md.(null)insampling_methods_str[]fordpm++2m_sde/dpm++2m_sde_bt(never extended when those samplers were added).Compatibility (verified locally on RTX 3060 12 GB)
--offload-to-cpu,--max-vram,--stream-layers: full, ~5 ms overhead per extra graph plan.--cache-mode easycacheand siblings: full.LOG_WARNfires when detected; docs cover the trade-off and how to tune around it.Example (Qwen Image, 1024x1024, 20 steps, seed 42, cfg 2.5)
Known limits (v1)
[W, H, C, N]).Checklist