Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

Optimizing Prompts for Text-to-Image Generation

About

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.

Yaru Hao, Zewen Chi, Li Dong, Furu Wei• 2022

Related benchmarks

TaskDatasetResultRank
Semantic consistency evaluationTIFA
Avg Answering Accuracy86.9
20
Semantic consistency evaluationDSG
Average Answering Accuracy78
20
Spatial Text-to-Image GenerationSpatialGenEval
SpatialGenEval Score48.7
19
Text-to-Image GenerationDSG benchmark
Aesthetic Score6.25
18
Text-to-Image GenerationLongText-EN
Normalized Score0.034
18
Text-to-Image GenerationLongText-ZH
Normalized Score7
18
Prompt-embedding OptimizationParti Prompts (36)
LAION Aesthetic V2 Average Score6.43
15
Artistic Image GenerationArtiMuse
Score60.65
14
Creative Image GenerationCREA
Score18.35
14
Prompt RefinementReFL unseen (test)
ImageReward0.404
10
Showing 10 of 21 rows

Other info

Follow for update