ChatPaper.aiChatPaper

DeepCache: 拡散モデルを無償で高速化する手法

DeepCache: Accelerating Diffusion Models for Free

December 1, 2023
著者: Xinyin Ma, Gongfan Fang, Xinchao Wang
cs.AI

要旨

拡散モデルは、その驚異的な生成能力により、最近画像合成の分野で空前の注目を集めています。しかしながら、これらのモデルはしばしば多大な計算コストを伴い、主に逐次的なノイズ除去プロセスと大規模なモデルサイズに起因しています。従来の拡散モデルの圧縮手法は、通常、大規模な再トレーニングを必要とし、コストと実現可能性の課題を抱えています。本論文では、モデルアーキテクチャの観点から拡散モデルを高速化する、新たなトレーニング不要のパラダイムであるDeepCacheを紹介します。DeepCacheは、拡散モデルの逐次的なノイズ除去ステップで観察される時間的な冗長性を活用し、隣接するノイズ除去ステージ間で特徴をキャッシュして取得することで、冗長な計算を削減します。U-Netの特性を利用し、高レベルの特徴を再利用しながら、低レベルの特徴を非常に低コストで更新します。この革新的な戦略により、Stable Diffusion v1.5ではCLIPスコアのわずか0.05の低下で2.3倍の高速化を実現し、LDM-4-GではImageNetでのFIDが0.22わずかに低下するものの4.1倍の高速化を達成しました。我々の実験では、DeepCacheが再トレーニングを必要とする既存のプルーニングや蒸留手法を上回り、現在のサンプリング技術との互換性も確認されています。さらに、同じスループットの下で、DeepCacheはDDIMやPLMSと同等またはわずかに改善された結果を効果的に達成することがわかりました。コードはhttps://github.com/horseee/DeepCacheで公開されています。
English
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.3times for Stable Diffusion v1.5 with only a 0.05 decline in CLIP Score, and 4.1times 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
PDF241December 15, 2024