arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2404.04095cs.CVcs.AI
收藏

面向文本到图像生成的动态提示词优化

Dynamic Prompt Optimizing for Text-to-Image Generation

Gaoling School of Artificial Intelligence, Renmin University of China(中国人民大学高瓴人工智能学院);Du Xiaoman Technology(度小满科技)

Wenyi Mo, Tianyu Zhang, Yalong Bai, Bing Su, Ji-Rong Wen, Qing Yang

AI总结:

本文提出 PAE 方法,通过在线强化学习自动优化提示词及各词权重与注入时间步,在保持语义一致的同时提升文生图视觉质量。

摘要:

文本到图像生成模型,尤其是基于 Imagen 和 Stable Diffusion 等扩散模型的方法,已经取得了显著进展。近来,对文本提示词进行精细调整引发了广泛兴趣。用户会为文本提示词中的某些词语分配权重,或改变其注入时间步,以提升生成图像的质量。然而,精细控制提示词的成功依赖于文本提示词的准确性,以及对权重和时间步的谨慎选择,这需要大量人工干预。为解决该问题,我们提出 Prompt Auto-Editing(PAE)方法。除了优化用于图像生成的原始提示词外,我们进一步采用在线强化学习策略,探索每个词语的权重和注入时间步,从而得到动态精细控制提示词。训练过程中的奖励函数鼓励模型综合考虑美学评分、语义一致性和用户偏好。实验结果表明,我们提出的方法能够有效改进原始提示词,在保持语义对齐的同时,生成视觉上更具吸引力的图像。代码位于 https://github.com/Mowenyii/PAE。

英文摘要:

Text-to-image generative models, specifically those based on diffusion models like Imagen and Stable Diffusion, have made substantial advancements. Recently, there has been a surge of interest in the delicate refinement of text prompts. Users assign weights or alter the injection time steps of certain words in the text prompts to improve the quality of generated images. However, the success of fine-control prompts depends on the accuracy of the text prompts and the careful selection of weights and time steps, which requires significant manual intervention. To address this, we introduce the \textbf{P}rompt \textbf{A}uto-\textbf{E}diting (PAE) method. Besides refining the original prompts for image generation, we further employ an online reinforcement learning strategy to explore the weights and injection time steps of each word, leading to the dynamic fine-control prompts. The reward function during training encourages the model to consider aesthetic score, semantic consistency, and user preferences. Experimental results demonstrate that our proposed method effectively improves the original prompts, generating visually more appealing images while maintaining semantic alignment. Code is available at https://github.com/Mowenyii/PAE.

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

↑