arXiv reaDer
Q-Diffusion: 量子化拡散モデル
Q-Diffusion: Quantizing Diffusion Models
拡散モデルは、ディープ ニューラル ネットワークを使用した反復ノイズ推定を通じて画像合成で大きな成功を収めています。ただし、ノイズ推定モデルの推論の遅さ、メモリ消費量の多さ、計算量の多さにより、拡散モデルの効率的な導入が妨げられています。ポストトレーニング量子化 (PTQ) は、他のタスクに最適な圧縮方法と考えられていますが、拡散モデルではそのままでは機能しません。我々は、ノイズ推定ネットワークを圧縮して生成プロセスを加速する、拡散モデルの独自のマルチタイムステップ パイプラインとモデル アーキテクチャに特化した新しい PTQ 手法を提案します。拡散モデルの量子化の主な難しさは、複数のタイム ステップにわたるノイズ推定ネットワークの出力分布の変化と、ノイズ推定ネットワーク内のショートカット層の二峰性活性化分布であると特定しました。この作業では、タイムステップを意識したキャリブレーションと分割ショートカット量子化によってこれらの課題に取り組みます。実験結果は、私たちが提案した方法が、トレーニング不要の方法で同等のパフォーマンス(従来の PTQ の >100 と比較して、最大 2.34 の小さな FID 変化)を維持しながら、完全精度の無条件拡散モデルを 4 ビットに量子化できることを示しています。私たちのアプローチはテキストガイドによる画像生成にも適用でき、初めて高い生成品質で 4 ビットの重みで安定した拡散を実行できます。
Diffusion models have achieved great success in image synthesis through iterative noise estimation using deep neural networks. However, the slow inference, high memory consumption, and computation intensity of the noise estimation model hinder the efficient adoption of diffusion models. Although post-training quantization (PTQ) is considered a go-to compression method for other tasks, it does not work out-of-the-box on diffusion models. We propose a novel PTQ method specifically tailored towards the unique multi-timestep pipeline and model architecture of the diffusion models, which compresses the noise estimation network to accelerate the generation process. We identify the key difficulty of diffusion model quantization as the changing output distributions of noise estimation networks over multiple time steps and the bimodal activation distribution of the shortcut layers within the noise estimation network. We tackle these challenges with timestep-aware calibration and split shortcut quantization in this work. Experimental results show that our proposed method is able to quantize full-precision unconditional diffusion models into 4-bit while maintaining comparable performance (small FID change of at most 2.34 compared to >100 for traditional PTQ) in a training-free manner. Our approach can also be applied to text-guided image generation, where we can run stable diffusion in 4-bit weights with high generation quality for the first time.
updated: Thu Jun 08 2023 09:21:05 GMT+0000 (UTC)
published: Wed Feb 08 2023 19:38:59 GMT+0000 (UTC)
参考文献 (このサイトで利用可能なもの) / References (only if available on this site)
被参照文献 (このサイトで利用可能なものを新しい順に) / Citations (only if available on this site, in order of most recent)
Amazon.co.jpアソシエイト