Abstract
Diffusion models are powerful generative tools but are computationally expensive due to the iterative nature of solving the Probability Flow Ordinary Differential Equation (PF-ODE). While fast numerical solvers exist, they often fail at very low step counts (NFE < 10) due to significant truncation errors. This paper introduces the Approximate MEan-Direction Solver (AMED-Solver), a novel approach that uses a lightweight neural network to predict the optimal "mean direction" of sampling steps. By exploiting the geometric simplicity of sampling trajectories, AMED-Solver enables high-quality image generation in as few as 5 steps, outperforming existing solvers and providing a versatile plugin for current sampling frameworks.
Introduction
Diffusion models like Stable Diffusion typically generate images by solving a PF-ODE, a process that usually requires dozens or hundreds of iterations. While high-order solvers such as DPM-Solver or UniPC have reduced this requirement, their mathematical approximations break down when pushed to extreme speeds (under 10 steps). These "truncation errors" lead to a massive drop in image quality. The challenge lies in taking large steps through the noise-to-data space without deviating from the correct integration path.
Geometric Insights and Methodology
The AMED-Solver is built on a key geometric observation: although image space is high-dimensional, any single sampling trajectory resides almost entirely within a two-dimensional subspace. This suggests that the "curviness" of the path is simpler than previously assumed.
Instead of relying on rigid Taylor expansions, AMED-Solver utilizes the Mean Value Theorem. It posits that for any large step, there exists an intermediate point and a scaling factor that perfectly represents the "average" direction of that interval. To find these optimal parameters, the authors train a tiny "AMED predictor"—a shallow MLP with only 9,000 parameters.
Key Components:
- Distillation-based Training: A "teacher" model (a slow, high-quality sampler) provides ground-truth trajectories for training.
- Parameter Prediction: The predictor analyzes the current step and internal U-Net features to determine the best intermediate time step ($s_n$) and scaling factor ($c_n$).
- AMED-Plugin: This version can be integrated into existing solvers like iPNDM or DPM-Solver++ to enhance their performance at low Number of Function Evaluations (NFE).
- Analytical First Step (AFS): By treating the initial sampling step as a straight line, the model saves one full U-Net evaluation, which is critical for 5-step budgets.
Experimental Results
AMED-Solver sets new state-of-the-art benchmarks for solver-based sampling at very low NFE across multiple datasets, including CIFAR-10, ImageNet, and Stable Diffusion.
On CIFAR-10, AMED-Solver achieved a Frechet Inception Distance (FID) of 6.61 in just 5 steps, compared to the baseline DDIM score of 49.66. On ImageNet 64x64, it reached an FID of 10.74 in 5 steps, significantly outperforming DPM-Solver-2 (42.41). When applied as a plugin to Stable Diffusion v1.4, it improved the FID from 21.33 to 18.92 at 8 NFE, producing noticeably sharper and more coherent images than standard solvers.
Conclusion
AMED-Solver demonstrates that learning the "average" direction of a step is more effective than approximating instantaneous derivatives at extreme speeds. While the method shows some sensitivity to time schedules and high-resolution AFS limitations, its efficiency and plugin versatility make it a significant step forward for real-time diffusion applications. Future work may involve optimizing the time schedule itself as part of the learning process.
Summary updated