Align Your Steps: Optimizing Sampling Schedules in Diffusion Models

2024年04月22日
扩散模型(DM)已经成为视觉领域和其他领域中最先进的生成建模方法。DM的一个关键缺点是它们的采样速度慢,依赖于通过大型神经网络的许多顺序函数评估。从DM中采样可以被看作是通过离散化的噪声级别集合解决微分方程。虽然过去的研究主要集中在推导高效的求解器上,但对于寻找最优采样计划却很少关注,整个文献都依赖于手工设计的启发式算法。在这项工作中,我们首次提出了一种通用和基于原则的方法,用于优化DM的采样计划,以获得高质量的输出,称为“Align Your Steps”。我们利用随机微积分的方法,为不同的求解器、训练DM和数据集找到最优的计划。我们在几个图像、视频以及二维玩具数据合成基准测试中评估了我们的新方法,使用了各种不同的采样器,并观察到我们优化的计划在几乎所有实验中都优于以前手工设计的计划。我们的方法展示了采样计划优化的未开发潜力,特别是在少步合成方案中。
Diffusion models (DMs) have established themselves as the state-of-the-art generative modeling approach in the visual domain and beyond. A crucial drawback of DMs is their slow sampling speed, relying on many sequential function evaluations through large neural networks. Sampling from DMs can be seen as solving a differential equation through a discretized set of noise levels known as the sampling schedule. While past works primarily focused on deriving efficient solvers, little attention has been given to finding optimal sampling schedules, and the entire literature relies on hand-crafted heuristics. In this work, for the first time, we propose a general and principled approach to optimizing the sampling schedules of DMs for high-quality outputs, called $\textit{Align Your Steps}$. We leverage methods from stochastic calculus and find optimal schedules specific to different solvers, trained DMs and datasets. We evaluate our novel approach on several image, video as well as 2D toy data synthesis benchmarks, using a variety of different samplers, and observe that our optimized schedules outperform previous hand-crafted schedules in almost all experiments. Our method demonstrates the untapped potential of sampling schedule optimization, especially in the few-step synthesis regime.
许愿