AsyncDiff: 非同期ノイズ除去による拡散モデルの並列化
AsyncDiff: Parallelizing Diffusion Models by Asynchronous Denoising
June 11, 2024
著者: Zigeng Chen, Xinyin Ma, Gongfan Fang, Zhenxiong Tan, Xinchao Wang
cs.AI
要旨
拡散モデルは、様々なアプリケーションにおける優れた生成能力から、コミュニティから大きな関心を集めています。しかし、その典型的な多段階の逐次的ノイズ除去特性は、累積的な遅延を引き起こし、並列計算の可能性を妨げています。この問題に対処するため、我々はAsyncDiffを提案します。これは、複数のデバイス間でモデル並列処理を可能にする汎用的でプラグアンドプレイ型の高速化手法です。我々のアプローチでは、煩雑なノイズ予測モデルを複数のコンポーネントに分割し、それぞれを異なるデバイスに割り当てます。これらのコンポーネント間の依存関係を断ち切るために、連続する拡散ステップ間の隠れ状態の高い類似性を利用して、従来の逐次的ノイズ除去を非同期プロセスに変換します。その結果、各コンポーネントは別々のデバイスで並列に計算を行うことが可能になります。提案手法は、生成品質に最小限の影響を与えながら、推論遅延を大幅に削減します。具体的には、Stable Diffusion v2.1において、AsyncDiffは4つのNVIDIA A5000 GPU上で、劣化を無視できる2.7倍の高速化と、CLIPスコアのわずか0.38の低下で4.0倍の高速化を達成しました。我々の実験では、AsyncDiffがビデオ拡散モデルにも容易に適用可能であり、有望な性能を示すことも実証されています。コードはhttps://github.com/czg1225/AsyncDiffで公開されています。
English
Diffusion models have garnered significant interest from the community for
their great generative ability across various applications. However, their
typical multi-step sequential-denoising nature gives rise to high cumulative
latency, thereby precluding the possibilities of parallel computation. To
address this, we introduce AsyncDiff, a universal and plug-and-play
acceleration scheme that enables model parallelism across multiple devices. Our
approach divides the cumbersome noise prediction model into multiple
components, assigning each to a different device. To break the dependency chain
between these components, it transforms the conventional sequential denoising
into an asynchronous process by exploiting the high similarity between hidden
states in consecutive diffusion steps. Consequently, each component is
facilitated to compute in parallel on separate devices. The proposed strategy
significantly reduces inference latency while minimally impacting the
generative quality. Specifically, for the Stable Diffusion v2.1, AsyncDiff
achieves a 2.7x speedup with negligible degradation and a 4.0x speedup with
only a slight reduction of 0.38 in CLIP Score, on four NVIDIA A5000 GPUs. Our
experiments also demonstrate that AsyncDiff can be readily applied to video
diffusion models with encouraging performances. The code is available at
https://github.com/czg1225/AsyncDiff.Summary
AI-Generated Summary