Directed Diffusion: Direct Control of Object Placement through Attention Guidance
Wan-Duo Kurt Ma, J. P. Lewis, W. Bastiaan Kleijn, Thomas Leung
Victoria University of Wellington & Google Research & Victoria University of Wellington and Google
定向扩散:通过注意力引导直接控制物体放置
要点:
1.文本引导的扩散模型,如 DALLE-2、IMAGEN 和 Stable Diffusion,只要给出描述所需图像内容的简短文本提示,就能够有效地生成无穷无尽的图像。 在许多情况下,图像的质量也非常高。 然而,这些模型通常难以组合包含多个关键对象的场景,例如具有指定位置关系的角色。 不幸的是,正如电影和动画理论文献中所承认的那样,这种“指导”图像内和图像间人物和物体放置的能力在讲故事中至关重要。
2.在这项工作中,采用一种特别直接的方法来提供所需的方向,通过在交叉注意力图中与受控对象对应的所需位置注入“激活”,同时衰减地图的其余部分。 由此产生的方法是朝着将文本引导扩散模型的适用性从单个图像推广到相关图像集合的一步,就像在故事书中一样。
- 讲故事。 我们的方法通过对多个对象的定位提供一致的控制,是讲故事的第一步。
- 组合性。 它通过提供明确的位置控制,为“组合性”提供了一种替代和直接的方法。
- 一致性。 定位的对象无缝且始终如一地适应环境,而不是显示为具有不一致交互(阴影、照明等)的另一幅图像的拼接。这种一致性归因于两个因素。 首先,我们使用一个简单的边界框来定位并允许去噪扩散过程填充细节,而使用像素空间掩码指定位置存在与早期去噪结果中隐含的形状和位置不一致的风险 . 其次,随后的扩散步骤对整个图像进行操作,并无缝地产生一致的照明和交互,例如狗在游泳池中跳跃的水花。
- 简单。 文本到图像模型的图像编辑方法通常需要提供详细的蒙版、深度图或其他精确的指导信息。 从头开始合成图像时,此信息不可用,而且创建起来会很费力。 我们的方法允许用户简单地通过指定近似边界框来控制对象的所需位置。 从计算的角度来看,我们的方法不需要微调或其他优化,只需几行代码就可以添加到现有的具有交叉注意力引导的文本驱动扩散模型中
一句话总结:
该定向扩散方法是第一个提供对多个对象的位置控制的扩散技术,同时利用现有的预训练模型并保持定位对象和背景之间的连贯混合。 而且,它只需要几行就可以实现。[机器翻译+人工总结]
Text-guided diffusion models such as DALLE-2, IMAGEN, and Stable Diffusion are able to generate an effectively endless variety of images given only a short text prompt describing the desired image content. In many cases the images are very high quality as well. However, these models often struggle to compose scenes containing several key objects such as characters in specified positional relationships. Unfortunately, this capability to ``direct'' the placement of characters and objects both within and across images is crucial in storytelling, as recognized in the literature on film and animation theory. In this work we take a particularly straightforward approach to providing the needed direction, by injecting ``activation'' at desired positions in the cross-attention maps corresponding to the objects under control, while attenuating the remainder of the map. The resulting approach is a step toward generalizing the applicability of text-guided diffusion models beyond single images to collections of related images, as in storybooks. To the best of our knowledge, our Directed Diffusion method is the first diffusion technique that provides positional control over multiple objects, while making use of an existing pre-trained model and maintaining a coherent blend between the positioned objects and the background. Moreover, it requires only a few lines to implement.
https://arxiv.org/pdf/2302.13153.pdf
内容中包含的图片若涉及版权问题,请及时与我们联系删除
评论
沙发等你来抢