arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2406.11831cs.CV
收藏

探索大型语言模型在扩散模型提示编码中的作用

Exploring the Role of Large Language Models in Prompt Encoding for Diffusion Models

SenseTime Research(商汤科技研究院);CUHK MMLab(香港中文大学多媒体实验室);Shanghai AI Laboratory(上海人工智能实验室);CPII under InnoHK(创新香港下的CPII)

Bingqi Ma, Zhuofan Zong, Guanglu Song, Hongsheng Li, Yu Liu

AI总结:

本文提出 LLM-Infused Diffuser 框架与 LI-DiT,通过使用引导和多 LLM 融合解决提示特征错位及位置偏差,显著提升文本到图像生成的提示理解能力。

摘要:

基于 decoder-only transformer 的大型语言模型(LLM)已展现出优于 CLIP 和 T5 系列模型的文本理解能力。然而,在文本到图像扩散模型中利用当前先进 LLM 的范式仍有待探索。我们观察到一个异常现象:直接将大型语言模型用作提示编码器,会显著降低图像生成中的提示遵循能力。我们识别出该问题背后的两个主要障碍。其一是 LLM 中的下一 token 预测训练与扩散模型对判别性提示特征的需求之间存在错位。其二是 decoder-only 架构引入的固有位置偏差。为解决这一问题,我们提出了一个新颖框架,以充分发挥 LLM 的能力。通过精心设计的使用引导,我们有效增强了用于提示编码的文本表示能力,并消除了其固有的位置偏差。这使我们能够灵活地将最先进的 LLM 集成到文本到图像生成模型中。此外,我们还提供了一种将多个 LLM 融合到该框架中的有效方式。鉴于 transformer 架构展现出的卓越性能和扩展能力,我们进一步基于该框架设计了 LLM-Infused Diffusion Transformer(LI-DiT)。我们在不同模型规模和数据规模上开展了大量实验以验证 LI-DiT。得益于 LLM 的内在能力和我们的创新设计,LI-DiT 的提示理解性能轻松超越了最先进的开源模型以及包括 Stable Diffusion 3、DALL-E 3 和 Midjourney V6 在内的主流闭源商业模型。LLM-Infused Diffuser 框架也是支撑高度先进的文本到图像模型 SenseMirage 的核心技术之一。

英文摘要:

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 LLM-Infused Diffuser framework is also one of the core technologies powering SenseMirage, a highly advanced text-to-image model.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑