ChatPaper.aiChatPaper

高速拡散:拡散モデルにおけるUNetエンコーダの役割の再考

Faster Diffusion: Rethinking the Role of UNet Encoder in Diffusion Models

December 15, 2023
著者: Senmao Li, Taihang Hu, Fahad Shahbaz Khan, Linxuan Li, Shiqi Yang, Yaxing Wang, Ming-Ming Cheng, Jian Yang
cs.AI

要旨

拡散モデルにおける重要なコンポーネントの一つは、ノイズ予測のためのUNetです。これまでにいくつかの研究がUNetデコーダの基本的な特性を探求してきましたが、そのエンコーダについてはほとんど研究されていません。本研究では、UNetエンコーダの初めての包括的な研究を行います。我々はエンコーダの特徴を実証的に分析し、推論プロセスにおけるそれらの変化に関する重要な疑問に対する洞察を提供します。特に、エンコーダの特徴は穏やかに変化するのに対し、デコーダの特徴は異なるタイムステップ間で大幅な変動を示すことを発見しました。この発見に基づき、特定の隣接するタイムステップでエンコーダを省略し、前のタイムステップのエンコーダ特徴をデコーダで循環的に再利用することを提案します。さらに、この観察に基づいて、多様なタスクにおける拡散サンプリングを加速するためのシンプルで効果的なエンコーダ伝播スキームを導入します。我々の伝播スキームを活用することで、特定の隣接するタイムステップでデコーダを並列実行することが可能になります。加えて、生成画像のテクスチャ詳細を改善するための事前ノイズ注入法を導入します。標準的なテキストから画像へのタスクに加えて、テキストからビデオ、パーソナライズド生成、および参照ガイド生成といった他のタスクでも我々のアプローチを検証します。知識蒸留技術を一切使用せずに、我々のアプローチはStable Diffusion(SD)とDeepFloyd-IFモデルのサンプリングをそれぞれ41%と24%加速し、高品質な生成性能を維持します。我々のコードはhttps://github.com/hutaiHang/Faster-Diffusion{FasterDiffusion}で公開されています。
English
One of the key components within diffusion models is the UNet for noise prediction. While several works have explored basic properties of the UNet decoder, its encoder largely remains unexplored. In this work, we conduct the first comprehensive study of the UNet encoder. We empirically analyze the encoder features and provide insights to important questions regarding their changes at the inference process. In particular, we find that encoder features change gently, whereas the decoder features exhibit substantial variations across different time-steps. This finding inspired us to omit the encoder at certain adjacent time-steps and reuse cyclically the encoder features in the previous time-steps for the decoder. Further based on this observation, we introduce a simple yet effective encoder propagation scheme to accelerate the diffusion sampling for a diverse set of tasks. By benefiting from our propagation scheme, we are able to perform in parallel the decoder at certain adjacent time-steps. Additionally, we introduce a prior noise injection method to improve the texture details in the generated image. Besides the standard text-to-image task, we also validate our approach on other tasks: text-to-video, personalized generation and reference-guided generation. Without utilizing any knowledge distillation technique, our approach accelerates both the Stable Diffusion (SD) and the DeepFloyd-IF models sampling by 41% and 24% respectively, while maintaining high-quality generation performance. Our code is available in https://github.com/hutaiHang/Faster-Diffusion{FasterDiffusion}.
PDF161December 15, 2024