DPMSolverMultistepScheduler<T>
Models & Types · AiDotNet.Diffusion.Schedulers
DPM-Solver++ multistep scheduler for fast diffusion model sampling.
Inheritance: NoiseSchedulerBase<T> → DPMSolverMultistepScheduler<T>
For Beginners
DPM-Solver++ is one of the fastest high-quality samplers.
Think of it like navigating with a GPS that remembers your path:
- Euler: Looks at current position only, takes simple steps
- DPM-Solver++: Remembers previous positions, predicts better next steps
Key characteristics:
- Very fast: Good quality in just 15-25 steps
- Multi-order: Uses 1st, 2nd, or 3rd order methods adaptively
- Deterministic: Same seed always gives same result
- Widely adopted: Used as default in many Stable Diffusion implementations
The “multistep” means it stores previous model outputs and uses them to make more accurate predictions, similar to Adams-Bashforth methods in numerical analysis.
How It Works
DPM-Solver++ is a high-order ODE solver specifically designed for diffusion models. It achieves state-of-the-art sampling quality with very few steps (10-25) by using multi-step methods that leverage history of previous model evaluations.
Reference: Lu et al., “DPM-Solver++: Fast Solver for Guided Sampling of Diffusion Probabilistic Models”, 2022
Constructors
| Constructor | Summary |
|---|---|
DPMSolverMultistepScheduler(SchedulerConfig<T> config, int solverOrder) |
Initializes a new instance of the DPM-Solver++ multistep scheduler. |
Methods
| Method | Summary |
|---|---|
Dictionary<string, object> GetState() |
|
Vector<T> Step(Vector<T> modelOutput, int timestep, Vector<T> sample, T eta, Vector<T> noise) |
Performs one DPM-Solver++ multistep denoising step. |
void LoadState(Dictionary<string, object> state) |
|
void SetTimesteps(int inferenceSteps) |
Sets up the inference timesteps and computes lambda/sigma/alpha schedules. |