细节藏于魔鬼:通过无冲突引导与分层注意力将图像提示的精细细节注入图像生成
Devil is in the Detail: Towards Injecting Fine Details of Image Prompt in Image Generation via Conflict-free Guidance and Stratified Attention
AI总结:
针对图像提示生成中细节丢失问题,提出无冲突引导和分层注意力方法,平衡真实感与贴合度,在三个任务上超越现有模型。
摘要:
虽然大规模文本到图像扩散模型能够根据文本提示生成高质量、多样化的图像,但这些提示难以捕捉诸如纹理之类的复杂细节,从而无法反映用户意图。这一局限性促使人们努力生成以用户提供的图像为条件的图像,即所谓的图像提示。近期的工作通过修改自注意力机制,用图像提示中的键和值替换或拼接,从而将图像条件施加于生成的图像。这使得自注意力层能够像交叉注意力层一样工作,而交叉注意力层通常用于融入文本提示。在本文中,我们指出了现有修改自注意力以生成反映图像提示细节的方法中存在的两个常见问题。首先,现有方法忽视了图像提示在无分类器引导中的重要性。具体而言,当前方法在无分类器引导中将图像提示同时用作期望条件和不需要的条件,导致信号冲突。为解决此问题,我们提出无冲突引导,仅将图像提示用作期望条件,确保生成的图像忠实反映图像提示。此外,我们观察到两种最常见的自注意力修改方式在生成图像的真实感与对图像提示的贴合度之间存在权衡。具体来说,从图像提示中选择更多的键和值会提高贴合度,而从生成的图像中选择更多则会增强真实感。为平衡两者,我们提出一种新的自注意力修改方法——分层注意力,联合使用来自两幅图像的键和值,而非在它们之间进行选择。通过在三个图像生成任务上的大量实验,我们证明所提出的方法在忠实反映图像提示方面优于现有的图像提示模型。
英文摘要:
While large-scale text-to-image diffusion models enable the generation of high-quality, diverse images from text prompts, these prompts struggle to capture intricate details, such as textures, preventing the user intent from being reflected. This limitation has led to efforts to generate images conditioned on user-provided images, referred to as image prompts. Recent work modifies the self-attention mechanism to impose image conditions in generated images by replacing or concatenating the keys and values from the image prompt. This enables the self-attention layer to work like a cross-attention layer, generally used to incorporate text prompts. In this paper, we identify two common issues in existing methods of modifying self-attention to generate images that reflect the details of image prompts. First, existing approaches neglect the importance of image prompts in classifier-free guidance. Specifically, current methods use image prompts as both desired and undesired conditions in classifier-free guidance, causing conflicting signals. To resolve this, we propose conflict-free guidance by using image prompts only as desired conditions, ensuring that the generated image faithfully reflects the image prompt. In addition, we observe that the two most common self-attention modifications involve a trade-off between the realism of the generated image and alignment with the image prompt. Specifically, selecting more keys and values from the image prompt improves alignment, while selecting more from the generated image enhances realism. To balance both, we propose an new self-attention modification method, Stratified Attention to jointly use keys and values from both images rather than selecting between them. Through extensive experiments across three image generation tasks, we show that the proposed method outperforms existing image-prompting models in faithfully reflecting the image prompt.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。