arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2312.00858cs.CVcs.AI
收藏

DeepCache:免费加速扩散模型

DeepCache: Accelerating Diffusion Models for Free

National University of Singapore(新加坡国立大学)

Xinyin Ma, Gongfan Fang, Xinchao Wang

AI总结:

本文提出无需训练的 DeepCache,通过缓存并复用相邻去噪步骤的 U-Net 高层特征减少冗余计算,在 Stable Diffusion 和 LDM-4-G 上实现显著加速且质量损失很小。

摘要:

扩散模型近期因其出色的生成能力在图像合成领域获得了前所未有的关注。尽管性能强大,但这些模型通常会产生高昂的计算成本,这主要源于顺序去噪过程和笨重的模型规模。压缩扩散模型的传统方法通常涉及大量重新训练,从而带来成本和可行性方面的挑战。本文提出 DeepCache,这是一种新颖的无需训练范式,从模型架构的角度加速扩散模型。DeepCache 利用扩散模型顺序去噪步骤中观察到的固有时间冗余,在相邻去噪阶段之间缓存并检索特征,从而减少冗余计算。借助 U-Net 的特性,我们以极低的成本更新低层特征,同时复用高层特征。这一创新策略进而使 Stable Diffusion v1.5 实现 2.3× 加速,而 CLIP Score 仅下降 0.05;并使 LDM-4-G 在 ImageNet 上实现 4.1× 加速,FID 仅轻微下降 0.22。实验还表明,DeepCache 优于现有的、需要重新训练的剪枝和蒸馏方法,并且与当前采样技术兼容。此外,我们发现,在相同吞吐量下,DeepCache 与 DDIM 或 PLMS 结合时,实际上能够取得相当甚至略有提升的结果。代码可在 https://github.com/horseee/DeepCache 获取。

英文摘要:

Diffusion models have recently gained unprecedented attention in the field of image synthesis due to their remarkable generative capabilities. Notwithstanding their prowess, these models often incur substantial computational costs, primarily attributed to the sequential denoising process and cumbersome model size. Traditional methods for compressing diffusion models typically involve extensive retraining, presenting cost and feasibility challenges. In this paper, we introduce DeepCache, a novel training-free paradigm that accelerates diffusion models from the perspective of model architecture. DeepCache capitalizes on the inherent temporal redundancy observed in the sequential denoising steps of diffusion models, which caches and retrieves features across adjacent denoising stages, thereby curtailing redundant computations. Utilizing the property of the U-Net, we reuse the high-level features while updating the low-level features in a very cheap way. This innovative strategy, in turn, enables a speedup factor of 2.3$\times$ for Stable Diffusion v1.5 with only a 0.05 decline in CLIP Score, and 4.1$\times$ for LDM-4-G with a slight decrease of 0.22 in FID on ImageNet. Our experiments also demonstrate DeepCache's superiority over existing pruning and distillation methods that necessitate retraining and its compatibility with current sampling techniques. Furthermore, we find that under the same throughput, DeepCache effectively achieves comparable or even marginally improved results with DDIM or PLMS. The code is available at https://github.com/horseee/DeepCache

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑