[Paper Review] Optimizing Prompts for Text-to-Image Generation
A framework called Promptist automatically adapts user prompts to model-preferred prompts for text-to-image generation, using supervised fine-tuning and reinforcement learning to improve aesthetics and relevance, outperforming manual prompt engineering on Stable Diffusion.
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.
Motivation & Objective
- Address misalignment between user prompts and model-preferred prompts in text-to-image generation.
- Propose a general, automatic prompt adaptation framework that generalizes across prompt domains.
- Leverage supervised fine-tuning on human-engineered prompts to initialize learning.
- Use reinforcement learning to further optimize prompts for better image aesthetics and relevance.
- Evaluate the approach against manual prompting and human judgments on in-domain and out-of-domain data.
Proposed method
- Build a Promptist policy model initialized by supervised fine-tuning on paired (source prompt, human-engineered target) data.
- Define a reward combining aesthetic and relevance signals plus a KL penalty to the SFT model to stabilize learning.
- Compute relevance via CLIP similarity between original input and images generated by the optimized prompt; apply a transformed scale.
- Compute aesthetics using an external aesthetic predictor built on top of CLIP, trained with human ratings.
- Train with proximal policy optimization (PPO) using diverse beam search and variable generation lengths to encourage quality and diversity.
- Evaluate on in-domain and out-of-domain prompts, comparing against original prompts and manually engineered prompts, with both automatic metrics and human judgments.
Experimental results
Research questions
- RQ1Can automatic prompt adaptation align user inputs with model-preferred prompts more effectively than manual engineering?
- RQ2Does reinforcement learning provide additional gains over supervised fine-tuning, particularly for out-of-domain prompts?
- RQ3How do optimized prompts perform in terms of relevance to user intent and image aesthetics across domains?
- RQ4How well do automatic rewards correlate with human preferences in evaluating prompt quality?
Key findings
- Optimized prompts outperform manually engineered prompts and original user inputs in automatic reward metrics on held-out data.
- Reinforcement learning yields larger gains than supervised fine-tuning, especially for out-of-domain prompts.
- Prompts optimized via Promptist achieve higher aesthetic scores while maintaining or improving relevance to the user input.
- Human evaluations show annotators generally prefer images from optimized prompts over original inputs, with some gap versus manual prompts for certain categories.
- Source prompt augmentation during supervised fine-tuning improves generalization to in-domain and out-of-domain data, and RL provides additional improvements beyond SFT.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.