feat: add DPM++ 2M SDE sampler#1742
Merged
Merged
Conversation
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
dpm++2m_sde- DPM-Solver++(2M) SDE, midpoint variant. It uses the same multistep skeleton as the existingdpm++2m(one model eval per step) plus a stochastic term controlled by--eta(default 1.0, matching k-diffusion). At the same seed it produces different but plausible compositions from the ODE variant, which is the expected signature of a working SDE sampler.Reference: Lu et al. arXiv:2211.01095; k-diffusion
sample_dpmpp_2m_sde.Wired through everywhere the existing samplers are: enum, name table, CLI
--sampling-methodand--etahelp, sd-api A1111 aliases (dpm++ 2m sde,k_dpmpp_2m_sde), andresolve_etadefault.Related Issue / Discussion
None.
Additional Information
Verified end to end on:
v1-5-pruned-emaonly-fp16) at 512x512, 20 steps, karras, seed 42AcornXL_V2) at 1024x1024, 25 steps, karras, cfg 6.0, seed 42Same prompt (
"a cat"), same seed. SDE and ODE outputs diverge as expected while remaining coherent and artifact-free. Runtime is on par withdpm++2m(SDXL 25 steps: 47.76s SDE vs 46.70s ODE).SD 1.5, 512x512, 20 steps
SDXL, 1024x1024, 25 steps
Design notes
randn_likeper step, matchingsample_er_sdeandsample_res_multistep. No BrownianTree sampler added.sample_dpmpp_2mODE sibling. Users on flow models should keep usingeuler_floworres_multistep.Checklist