Diffusion models have showcased their remarkable capability to synthesize diverse and high-quality images, sparking interest in their application for real image editing. However, existing diffusion-based approaches for local image editing often suffer from undesired artifacts due to the pixel-level blending of the noised target images and diffusion latent variables, which lack the necessary semantics for maintaining image consistency. To address these issues, we propose PFB-Diff, a Progressive Feature Blending method for Diffusion-based image editing. Unlike previous methods, PFB-Diff seamlessly integrates text-guided generated content into the target image through multi-level feature blending. The rich semantics encoded in deep features and the progressive blending scheme from high to low levels ensure semantic coherence and high quality in edited images. Additionally, we introduce an attention masking mechanism in the cross-attention layers to confine the impact of specific words to desired regions, further improving the performance of background editing. PFB-Diff can effectively address various editing tasks, including object/background replacement and object attribute editing. Our method demonstrates its superior performance in terms of image fidelity, editing accuracy, efficiency, and faithfulness to the original image, without the need for fine-tuning or training.
翻译:扩散模型在合成多样且高质量图像方面展现出卓越能力,激发了其在真实图像编辑任务中的应用兴趣。然而,现有基于扩散模型的局部图像编辑方法通常因噪声目标图像与扩散潜变量之间的像素级融合而产生伪影,缺乏维持图像一致性所需的语义信息。为解决这些问题,我们提出PFB-Diff——一种用于基于扩散图像编辑的渐进式特征融合方法。与以往方法不同,PFB-Diff通过多层级特征融合,将文本引导生成的图像内容无缝整合至目标图像中。深度特征中编码的丰富语义信息,以及从高层到低层的渐进式融合机制,确保了编辑后图像的语义连贯性与高质量。此外,我们在交叉注意力层引入注意力掩码机制,将特定词汇的影响限定至目标区域,进一步提升背景编辑性能。PFB-Diff能够有效处理多种编辑任务,包括物体/背景替换以及物体属性编辑。无需微调或训练,我们的方法在图像保真度、编辑精度、效率及对原始图像的忠实度方面均展现出优越性能。