Exploring the Role of Large Language Models in Prompt Encoding for Diffusion Models
Bingqi Ma, Zhuofan Zong, Guanglu Song, Hongsheng Li, Yu Liu
Abstract
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.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 7e13602d-8a59-4da2-8687-8a21783401a8Cited by top-tier papers25
- MoVA: Adapting Mixture of Vision Experts to Multimodal ContextZhuofan Zong, Bingqi Ma, Dazhong Shen, Guanglu Song et al.NeurIPS 2024 · 110 citations
- Phased Consistency ModelsFu-Yun Wang, Zhaoyang Huang, Alexander William Bergman, Dazhong Shen et al.NeurIPS 2024 · 86 citations
- CoMat: Aligning Text-to-Image Diffusion Model with Image-to-Text Concept MatchingDongzhi Jiang, Guanglu Song, Xiaoshi Wu, Renrui Zhang et al.NeurIPS 2024 · 75 citations
- Neighbor GRPO: Contrastive ODE Policy Optimization Aligns Flow ModelsDailan He, Guanlin Feng, Xingtong Ge, Yazhe Niu et al.CVPR 2026 · 15 citations
- Lumina-Image 2.0: a Unified and Efficient Image Generative FrameworkQi Qin, Le Zhuo, Yi Xin, Ruoyi Du et al.ICCV 2025 · 11 citations
Builds on25
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- Learning Transferable Visual Models From Natural Language SupervisionAlec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh et al.ICML 2021 · 47,906 citations
- Denoising Diffusion Probabilistic ModelsJonathan Ho, Ajay Jain, Pieter AbbeelNeurIPS 2020 · 35,902 citations
- Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida et al.NeurIPS 2022 · 24,707 citations
- High-Resolution Image Synthesis with Latent Diffusion ModelsRobin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser et al.CVPR 2022 · 13,123 citations
Related papers
- Decoder-Only LLMs are Better Controllers for Diffusion ModelsZiyi Dong, Yao Xiao, Pengxu Wei, Liang LinACM MM 2024 · 3 citations
- A Comprehensive Study of Decoder-Only LLMs for Text-to-Image GenerationAndrew Z. Wang, Songwei Ge, Tero Karras, Ming-Yu Liu et al.CVPR 2025
- Visually Guided Decoding: Gradient-Free Hard Prompt Inversion with Language ModelsDonghoon Kim, Minji Bae, Kyuhong Shim, Byonghyo ShimICLR 2025
- LLM4GEN: Leveraging Semantic Representation of LLMs for Text-to-Image GenerationMushui Liu, Yuhang Ma, Zhen Yang, Jun Dan et al.AAAI 2025 · 36 citations
- Self-Correcting LLM-Controlled Diffusion ModelsTsung-Han Wu, Long Lian, Joseph E. Gonzalez, Boyi Li et al.CVPR 2024 · 22 citations
