拡散モデルにおけるプロンプトエンコーディングへの大規模言語モデルの役割の探求
Exploring the Role of Large Language Models in Prompt Encoding for Diffusion Models
June 17, 2024
著者: Bingqi Ma, Zhuofan Zong, Guanglu Song, Hongsheng Li, Yu Liu
cs.AI
要旨
デコーダのみのトランスフォーマーに基づく大規模言語モデル(LLM)は、CLIPやT5シリーズのモデルと比較して優れたテキスト理解能力を示しています。しかし、現在の先進的なLLMをテキストから画像への拡散モデルに活用するためのパラダイムはまだ探求の余地があります。私たちは、LLMを直接プロンプトエンコーダとして使用すると、画像生成におけるプロンプト追従能力が著しく低下するという異常な現象を観察しました。この問題の背後には、主に2つの障害があることを特定しました。1つは、LLMの次のトークン予測トレーニングと拡散モデルに必要な識別可能なプロンプト特徴との間の不一致です。もう1つは、デコーダのみのアーキテクチャによって導入される本質的な位置バイアスです。この問題に対処するため、私たちはLLMの能力を最大限に活用するための新しいフレームワークを提案します。慎重に設計された使用ガイドラインを通じて、プロンプトエンコーディングのためのテキスト表現能力を効果的に向上させ、その本質的な位置バイアスを排除します。これにより、最先端のLLMをテキストから画像生成モデルに柔軟に統合することが可能になります。さらに、複数のLLMを私たちのフレームワークに融合するための効果的な方法も提供します。トランスフォーマーアーキテクチャが示す優れた性能とスケーリング能力を考慮し、私たちはこのフレームワークに基づいてLLM-Infused Diffusion Transformer(LI-DiT)をさらに設計しました。モデルサイズとデータサイズにわたってLI-DiTを検証するための広範な実験を実施しました。LLMの本質的な能力と私たちの革新的な設計の恩恵を受け、LI-DiTのプロンプト理解性能は、Stable Diffusion 3、DALL-E 3、Midjourney V6などの最先端のオープンソースモデルおよび主流のクローズドソース商用モデルを容易に凌駕します。強力なLI-DiT-10Bは、さらなる最適化とセキュリティチェックの後に利用可能になります。
English
Large language models (LLMs) based on decoder-only transformers have
demonstrated superior text understanding capabilities compared to CLIP and
T5-series models. However, the paradigm for utilizing current advanced LLMs in
text-to-image diffusion models remains to be explored. We observed an unusual
phenomenon: directly using a large language model as the prompt encoder
significantly degrades the prompt-following ability in image generation. We
identified two main obstacles behind this issue. One is the misalignment
between the next token prediction training in LLM and the requirement for
discriminative prompt features in diffusion models. The other is the intrinsic
positional bias introduced by the decoder-only architecture. To deal with this
issue, we propose a novel framework to fully harness the capabilities of LLMs.
Through the carefully designed usage guidance, we effectively enhance the text
representation capability for prompt encoding and eliminate its inherent
positional bias. This allows us to integrate state-of-the-art LLMs into the
text-to-image generation model flexibly. Furthermore, we also provide an
effective manner to fuse multiple LLMs into our framework. Considering the
excellent performance and scaling capabilities demonstrated by the transformer
architecture, we further design an LLM-Infused Diffusion Transformer (LI-DiT)
based on the framework. We conduct extensive experiments to validate LI-DiT
across model size and data size. Benefiting from the inherent ability of the
LLMs and our innovative designs, the prompt understanding performance of LI-DiT
easily surpasses state-of-the-art open-source models as well as mainstream
closed-source commercial models including Stable Diffusion 3, DALL-E 3, and
Midjourney V6. The powerful LI-DiT-10B will be available after further
optimization and security checks.Summary
AI-Generated Summary