arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2503.19937cs.CVcs.AI
收藏

反向提示:破解文本到图像生成中的配方

Reverse Prompt: Cracking the Recipe Inside Text-to-Image Generation

Nanyang Technological University(南洋理工大学);JD Explore Academy(京东探索研究院)

Zhiyao Ren, Yibing Zhan, Baosheng Yu, Dacheng Tao

AI总结:

本文提出自动反向提示优化(ARPO)方法,通过迭代模仿梯度优化从参考图像解码文本提示,实现高质量反向提示生成,并支持编辑提示创作多样新图像。

摘要:

文本到图像生成已变得越来越流行,但获得期望的图像通常需要大量的提示工程。在本文中,我们探索如何从参考图像中解码文本提示,这一过程我们称之为图像反向提示工程。该技术使我们能够从参考图像中获取见解,理解伟大艺术家的创作过程,并生成令人印象深刻的新图像。为了解决这一挑战,我们提出了一种称为自动反向提示优化(ARPO)的方法。具体而言,我们的方法通过迭代模仿梯度提示优化过程将初始提示优化为高质量提示:1)从当前提示生成重建图像以实例化其引导能力;2)产生文本梯度,即旨在减少重建图像与参考图像之间差异的候选提示;3)使用贪心搜索方法用文本梯度更新当前提示,以最大化提示与参考图像之间的CLIP相似度。我们将ARPO与几种基线方法进行比较,包括手工技术、基于梯度的提示调整方法、图像字幕和数据驱动选择方法。定量和定性结果均表明,我们的ARPO能快速收敛以生成高质量的反向提示。更重要的是,我们可以通过直接编辑这些反向提示轻松创建具有多样风格和内容的新颖图像。代码将公开发布。

英文摘要:

Text-to-image generation has become increasingly popular, but achieving the desired images often requires extensive prompt engineering. In this paper, we explore how to decode textual prompts from reference images, a process we refer to as image reverse prompt engineering. This technique enables us to gain insights from reference images, understand the creative processes of great artists, and generate impressive new images. To address this challenge, we propose a method known as automatic reverse prompt optimization (ARPO). Specifically, our method refines an initial prompt into a high-quality prompt through an iteratively imitative gradient prompt optimization process: 1) generating a recreated image from the current prompt to instantiate its guidance capability; 2) producing textual gradients, which are candidate prompts intended to reduce the difference between the recreated image and the reference image; 3) updating the current prompt with textual gradients using a greedy search method to maximize the CLIP similarity between prompt and reference image. We compare ARPO with several baseline methods, including handcrafted techniques, gradient-based prompt tuning methods, image captioning, and data-driven selection method. Both quantitative and qualitative results demonstrate that our ARPO converges quickly to generate high-quality reverse prompts. More importantly, we can easily create novel images with diverse styles and content by directly editing these reverse prompts. Code will be made publicly available.

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

↑