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

优化文本到图像生成的提示词

Optimizing Prompts for Text-to-Image Generation

Microsoft Research(微软研究院)

Yaru Hao, Zewen Chi, Li Dong, Furu Wei

AI总结:

提出提示词自适应框架,自动将用户输入调整为模型偏好提示词,结合监督微调和强化学习,在Stable Diffusion上优于人工设计。

摘要:

精心设计的提示词可以引导文本到图像模型生成令人惊叹的图像。然而,性能优越的提示词往往针对特定模型,并且与用户输入不一致。为了避免繁琐的人工设计,我们提出了提示词自适应(prompt adaptation),这是一个通用框架,能够自动将原始用户输入调整为模型偏好的提示词。具体而言,我们首先在一个小型人工设计的提示词集合上,使用预训练语言模型进行监督微调。然后,我们使用强化学习来探索更好的提示词。我们定义了一个奖励函数,鼓励策略在保留原始用户意图的同时生成更具美感的图像。在Stable Diffusion上的实验结果表明,我们的方法在自动评估指标和人类偏好评分方面均优于人工提示词设计。此外,强化学习进一步提升了性能,尤其是在域外提示词上。预训练检查点可在https://aka.ms/promptist获取。演示可在https://aka.ms/promptist-demo找到。

英文摘要:

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.

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

↑