Cross-Attention Makes Inference Cumbersome in Text-to-Image Diffusion Models

要約

本研究では、テキスト条件付き拡散モデルにおける推論中の交差注意の役割を探る。我々は、クロスアテンションアウトプットが数回の推論ステップを経て一定点に収束することを発見した。すなわち、テキスト指向の視覚的意味論を計画するために交差的注意に依存する初期意味論計画段階と、モデルが以前に計画した意味論から画像を生成しようとする忠実度向上段階である。驚くべきことに、忠実度向上段階においてテキスト条件を無視することで、計算の複雑さが軽減されるだけでなく、モデルの性能も維持される。これにより、効率的な生成のためのTGATEと呼ばれるシンプルで訓練不要の手法が得られる。この手法は、一旦収束したクロスアテンション出力をキャッシュし、残りの推論ステップの間、それを固定する。MS-COCO検証セットを用いた実証研究により、TGATEの有効性が確認された。TGATEのソースコードはhttps://github.com/HaozheLiu-ST/T-GATE。

要約(オリジナル)

This study explores the role of cross-attention during inference in text-conditional diffusion models. We find that cross-attention outputs converge to a fixed point after few inference steps. Accordingly, the time point of convergence naturally divides the entire inference process into two stages: an initial semantics-planning stage, during which, the model relies on cross-attention to plan text-oriented visual semantics, and a subsequent fidelity-improving stage, during which the model tries to generate images from previously planned semantics. Surprisingly, ignoring text conditions in the fidelity-improving stage not only reduces computation complexity, but also maintains model performance. This yields a simple and training-free method called TGATE for efficient generation, which caches the cross-attention output once it converges and keeps it fixed during the remaining inference steps. Our empirical study on the MS-COCO validation set confirms its effectiveness. The source code of TGATE is available at https://github.com/HaozheLiu-ST/T-GATE.

arxiv情報

著者 Wentian Zhang,Haozhe Liu,Jinheng Xie,Francesco Faccio,Mike Zheng Shou,Jürgen Schmidhuber
発行日 2024-04-03 13:44:41+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, DeepL

カテゴリー: cs.CV パーマリンク