Abstract
Diffusion models are powerful generative tools but suffer from high computational costs during inference. While existing acceleration methods focus on model distillation or handcrafted ODE solvers, this paper introduces a Differentiable Solver Search (DSS) algorithm. By optimizing solver coefficients and timesteps through gradient descent, DSS discovers data-driven solvers tailored to specific model architectures. This approach achieves state-of-the-art image quality in as few as 10 steps without modifying pre-trained weights, demonstrating significant improvements over traditional numerical methods.
Introduction
The generation of high-fidelity images via diffusion models typically requires dozens or hundreds of sampling steps. To mitigate this, researchers have pursued two primary strategies: distillation and advanced ODE solvers. Distillation techniques train a student model to map noise to data in fewer steps, but often at the cost of altering pre-trained weights and sacrificing some generation quality. Conversely, ODE solvers like DPM-Solver and UniPC utilize numerical integration techniques to take larger steps through the sampling trajectory without changing the underlying model.
However, current state-of-the-art solvers are largely based on handcrafted mathematical frameworks, such as Adams-Bashforth methods. These solvers rely on Lagrange interpolation to minimize integration errors based solely on time ($t$), ignoring the actual data state ($x$). This paper proposes a paradigm shift: instead of relying on rigid mathematical derivations, can we use gradient descent to search for the optimal solver parameters for a specific diffusion model?
Methodology: Differentiable Solver Search
The authors propose a Differentiable Solver Search (DSS) algorithm designed to find the most efficient sampling path for any given diffusion model. The method consists of three core components:
1. Mathematical Simplification
The authors demonstrate that the complex interpolation functions used in traditional multi-step solvers can be reduced to a compact matrix of coefficients. This simplification allows the solver's behavior to be parameterized in a way that is amenable to optimization.
2. Defining the Search Space
The search space is constrained to two primary variables:
- Timesteps: The specific points in the diffusion process where the model evaluates noise.
- Solver Coefficients: The weights assigned to previous steps to predict the subsequent state.
3. Optimization via Mono-alignment Supervision
To find the optimal parameters, the authors initialize the solver to mimic a standard Euler solver. They then generate "perfect" reference trajectories using a high-fidelity solver (e.g., 250 steps). Using gradient descent, the algorithm minimizes the Mean Squared Error (MSE) between the output of a 5-to-10 step solver and the high-step reference trajectory. This "Mono-alignment Supervision" ensures the fast solver closely tracks the ideal sampling path.
Experimental Results
The DSS algorithm was evaluated across multiple datasets and model architectures, including ImageNet and COCO.
ImageNet Performance
On ImageNet-256, the searched solvers demonstrated superior performance compared to traditional handcrafted methods:
- DiT-XL/2 (DDPM-based): Achieved a 2.33 FID in 10 steps, significantly outperforming DPM-Solver++ and UniPC.
- SiT-XL/2 (Rectified Flow): Achieved a 2.40 FID.
- FlowDCN-XL/2: Achieved a 2.35 FID.
Notably, the results suggest that when equipped with an optimized solver, standard DDPMs (like DiT) can match or even surpass the performance of Rectified Flow models in few-step generation—a finding that challenges the common belief that Rectified Flow is inherently superior for fast sampling.
Text-to-Image Quality
The authors applied the searched solvers to large-scale text-to-image models, including Flux.1-dev, SD3, and PixArt-Σ. In the 5-10 step range, the DSS-optimized solvers consistently produced images with higher clarity and fewer artifacts than the default solvers provided with these models.
Insights and Discussion
The research provides several key insights into the nature of diffusion sampling:
- Data-Driven vs. Handcrafted: Learned coefficients provide a strictly lower upper-error bound than traditional Adams-like linear multi-step methods. By adapting to the specific geometry of a model's sampling trajectory, DSS captures nuances that general-purpose solvers miss.
- Model-Specific Trajectories: Visualization of the searched coefficients reveals distinct behaviors between model types. DDPMs exhibit curved sampling paths where coefficients concentrate on the diagonal, whereas Rectified Flow models favor a flatter distribution of weights.
- Efficiency of Search: The search process is remarkably efficient. Finding an optimal solver using 50,000 samples takes approximately 30 minutes on an 8× H20 GPU setup. Once the parameters are found, they are hardcoded, ensuring that inference speed remains identical to traditional solvers.
Limitations and Future Work
Despite its success, DSS has limitations. The solver's performance can degrade at high Classifier-Free Guidance (CFG) scales, likely due to the naive structure of the current search space. Future iterations may incorporate predictor-corrector mechanisms to improve numerical stability. Additionally, while MSE against a reference trajectory is an effective proxy, it does not perfectly correlate with perceptual quality metrics like FID. Incorporating distribution-matching supervision could further refine the search results. Finally, while the search is fast, it remains a model-specific requirement that lacks the "out-of-the-box" universality of handcrafted solvers.
Conclusion
Differentiable Solver Search represents a significant step forward in making diffusion models more practical for real-world applications. By treating solver design as an optimization problem rather than a purely mathematical one, the authors have unlocked new levels of efficiency and quality in few-step generation.
Summary updated