Lune

NeurIPS2023Top-tier venue

Optimizing Prompts for Text-to-Image Generation

Yaru Hao, Zewen Chi, Li Dong, Furu Wei

Abstract

Well-designed prompts can guide text-to-image models to generate amazing images. However, the performant prompts are often model-specific and misaligned with user input. Instead of laborious human engineering, we propose prompt adaptation, a general framework that automatically adapts original user input to model-preferred prompts. Specifically, we first perform supervised fine-tuning with a pretrained language model on a small collection of manually engineered prompts. Then we use reinforcement learning to explore better prompts. We define a reward function that encourages the policy to generate more aesthetically pleasing images while preserving the original user intentions. Experimental results on Stable Diffusion show that our method outperforms manual prompt engineering in terms of both automatic metrics and human preference ratings. Moreover, reinforcement learning further boosts performance, especially on out-of-domain prompts. The pretrained checkpoints are available at https://aka.ms/promptist . The demo can be found at https://aka.ms/promptist-demo .

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

96 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Directly Fine-Tuning Diffusion Models on Differentiable Rewards cites High-Resolution Image Synthesis with Latent Diffusion Models
  • Directly Fine-Tuning Diffusion Models on Differentiable Rewards cites Learning Transferable Visual Models From Natural Language Supervision
  • Directly Fine-Tuning Diffusion Models on Differentiable Rewards cites Training language models to follow instructions with human feedback
  • PromptMagician: Interactive Prompt Engineering for Text-to-Image Creation cites High-Resolution Image Synthesis with Latent Diffusion Models
  • PromptMagician: Interactive Prompt Engineering for Text-to-Image Creation cites Language Models are Few-Shot Learners
  • PromptMagician: Interactive Prompt Engineering for Text-to-Image Creation cites Learning Transferable Visual Models From Natural Language Supervision
  • PromptMagician: Interactive Prompt Engineering for Text-to-Image Creation cites Training language models to follow instructions with human feedback
  • Iterative Preference Learning from Human Feedback: Bridging Theory and Practice for RLHF under KL-constraint cites Training language models to follow instructions with human feedback
  • Learning Transferable Visual Models From Natural Language Supervision cites Language Models are Few-Shot Learners
  • Human Preference Score: Better Aligning Text-to-image Models with Human Preference cites High-Resolution Image Synthesis with Latent Diffusion Models
  • Human Preference Score: Better Aligning Text-to-image Models with Human Preference cites Learning Transferable Visual Models From Natural Language Supervision
  • Human Preference Score: Better Aligning Text-to-image Models with Human Preference cites Training language models to follow instructions with human feedback
  • Chain-of-Thought Prompting Elicits Reasoning in Large Language Models cites Training language models to follow instructions with human feedback
  • Training language models to follow instructions with human feedback cites Language Models are Few-Shot Learners
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers96

  1. Directly Fine-Tuning Diffusion Models on Differentiable RewardsKevin Clark, Paul Vicol, Kevin Swersky, David J. FleetICLR 2024 · 377 citations
  2. Iterative Preference Learning from Human Feedback: Bridging Theory and Practice for RLHF under KL-constraintWei Xiong, Hanze Dong, Chenlu Ye, Ziqi Wang et al.ICML 2024 · 346 citations
  3. Human Preference Score: Better Aligning Text-to-image Models with Human PreferenceXiaoshi Wu, Keqiang Sun, Feng Zhu, Rui Zhao et al.ICCV 2023 · 323 citations
  4. Automatic Prompt Optimization with "Gradient Descent" and Beam SearchReid Pryzant, Dan Iter, Jerry Li, Yin Tat Lee et al.EMNLP 2023 · 137 citations
  5. PromptMagician: Interactive Prompt Engineering for Text-to-Image CreationYingchaojie Feng, Xingbo Wang, Kamkwai Wong, Sijia Wang et al.IEEE VIS 2023 · 127 citations

Builds on22

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. Learning Transferable Visual Models From Natural Language SupervisionAlec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh et al.ICML 2021 · 47,906 citations
  3. Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida et al.NeurIPS 2022 · 24,707 citations
  4. Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma et al.NeurIPS 2022 · 22,562 citations
  5. High-Resolution Image Synthesis with Latent Diffusion ModelsRobin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser et al.CVPR 2022 · 13,123 citations

Related papers

  1. Dynamic Prompt Optimizing for Text-to-Image GenerationWenyi Mo, Tianyu Zhang, Yalong Bai, Bing Su et al.CVPR 2024 · 15 citations
  2. DiffChat: Learning to Chat with Text-to-Image Synthesis Models for Interactive Image CreationJiapeng Wang, Chengyu Wang, Tingfeng Cao, Jun Huang et al.ACL Findings 2024 · 1 citation
  3. A User-Friendly Framework for Generating Model-Preferred Prompts in Text-to-Image SynthesisNailei Hei, Qianyu Guo, Zihao Wang, Yan Wang et al.AAAI 2024 · 11 citations
  4. Self-Rewarding Large Vision-Language Models for Optimizing Prompts in Text-to-Image GenerationHongji Yang, Yucheng Zhou, Wencheng Han, Jianbing ShenACL Findings 2025
  5. RePrompt: Reasoning-Augmented Reprompting for Text-to-Image Generation via Reinforcement LearningMingrui Wu, Lu Wang, Pu Zhao, Fangkai Yang et al.ICLR 2026 · 19 citations
Dusk over the sea between two cliffs drawn in fine vertical lines