arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2208.01626cs.CVcs.CLcs.GRcs.LG
收藏

基于交叉注意控制的快速图像编辑

Prompt-to-Prompt Image Editing with Cross Attention Control

Google Research(谷歌研究院);Tel Aviv University(特拉维夫大学)

Amir Hertz, Ron Mokady, Jay Tenenbaum, Kfir Aberman, Yael Pritch, Daniel Cohen-Or

摘要:

最近的大规模文本驱动的合成模型吸引了很多关注,由于其显着的能力,生成高度多样化的图像,按照给定的文本提示。这种基于文本的合成方法特别吸引那些习惯于口头描述其意图的人。因此,将文本驱动的图像合成扩展到文本驱动的图像编辑是很自然的。编辑对于这些生成模型来说是一个挑战,因为编辑技术的固有属性是保留大部分原始图像,而在基于文本的模型中,即使是对文本提示的微小修改也会导致完全不同的结果。现有技术的方法通过要求用户提供空间掩模来本地化编辑,从而忽略掩模区域内的原始结构和内容来减轻这一点。在本文中,我们追求一个直观的提示到提示的编辑框架,其中的编辑仅由文本控制。为此,我们深入分析了文本条件模型,并观察到交叉注意层是控制图像空间布局与提示中每个单词之间关系的关键。有了这个观察,我们提出了几个应用程序,通过编辑文本提示只监视图像合成。这包括通过替换单词进行本地化编辑,通过添加规范进行全局编辑,甚至微妙地控制单词在图像中的反映程度。我们在不同的图像和提示上展示了我们的结果,展示了高质量的合成和对编辑提示的保真度。

英文摘要:

Recent large-scale text-driven synthesis models have attracted much attention thanks to their remarkable capabilities of generating highly diverse images that follow given text prompts. Such text-based synthesis methods are particularly appealing to humans who are used to verbally describe their intent. Therefore, it is only natural to extend the text-driven image synthesis to text-driven image editing. Editing is challenging for these generative models, since an innate property of an editing technique is to preserve most of the original image, while in the text-based models, even a small modification of the text prompt often leads to a completely different outcome. State-of-the-art methods mitigate this by requiring the users to provide a spatial mask to localize the edit, hence, ignoring the original structure and content within the masked region. In this paper, we pursue an intuitive prompt-to-prompt editing framework, where the edits are controlled by text only. To this end, we analyze a text-conditioned model in depth and observe that the cross-attention layers are the key to controlling the relation between the spatial layout of the image to each word in the prompt. With this observation, we present several applications which monitor the image synthesis by editing the textual prompt only. This includes localized editing by replacing a word, global editing by adding a specification, and even delicately controlling the extent to which a word is reflected in the image. We present our results over diverse images and prompts, demonstrating high-quality synthesis and fidelity to the edited prompts.

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

↑