用数学方法提升扩散模型推理速度,不降质且快3倍
AB-Cache: Training-Free Acceleration of Diffusion Models via Adams-Bashforth Cached Feature Reuse
- 基于亚当-巴什福斯法分析去噪过程,发现相邻步骤输出有线性关系
- 提出新缓存策略,实现近3倍加速,性能与原模型一致
- 无需训练,适配多种图像视频生成模型和调度器
扩散模型在生成任务中表现卓越,但其迭代去噪过程导致推理缓慢,限制了实际应用。现有加速方法虽利用相邻步骤间的U形相似性进行缓存,但缺乏理论支撑,简单重用计算常导致性能下降。本文通过二阶亚当-巴什福斯方法分析去噪过程,揭示相邻步骤输出存在线性关系,解释了U形模式的成因。进一步将该方法推广至高阶,提出一种新型基于缓存的加速方案:不直接复用缓存结果,而是通过截断误差仅 $O(h^k)$ 的设计,实现高效加速。在包括 HunyuanVideo 和 FLUX.1-dev 在内的多种图像与视频扩散模型上,使用不同调度器进行验证,结果表明本方法可实现接近3倍的速度提升,同时保持原始生成质量,提供了一种无需训练、可实用的实时生成解决方案。
原文摘要 · Abstract (English)
Diffusion models have demonstrated remarkable success in generative tasks, yet their iterative denoising process results in slow inference, limiting their practicality. While existing acceleration methods exploit the well-known U-shaped similarity pattern between adjacent steps through caching mechanisms, they lack theoretical foundation and rely on simplistic computation reuse, often leading to performance degradation. In this work, we provide a theoretical understanding by analyzing the denoising process through the second-order Adams-Bashforth method, revealing a linear relationship between the outputs of consecutive steps. This analysis explains why the outputs of adjacent steps exhibit a U-shaped pattern. Furthermore, extending Adams-Bashforth method to higher order, we propose a novel caching-based acceleration approach for diffusion models, instead of directly reusing cached results, with a truncation error bound of only \(O(h^k)\) where $h$ is the step size. Extensive validation across diverse image and video diffusion models (including HunyuanVideo and FLUX.1-dev) with various schedulers demonstrates our method's effectiveness in achieving nearly $3\times$ speedup while maintaining original performance levels, offering a practical real-time solution without compromising generation quality.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。