arXiv:2411.19652cs.CVcs.AI2024-11中稿 · WACV 2025被引 2

用统一注意力图提升扩散模型图像重建质量

Uniform Attention Maps: Boosting Image Fidelity in Reconstruction and Editing

  • 用均匀注意力图替代传统交叉注意力,改善重建结构
  • 在DDIM反演中降低畸变,重建误差显著下降
  • 适合需要高保真图像编辑与生成的科研与应用

使用扩散模型进行文本引导的图像生成与编辑已取得显著进展。其中,无需微调的方法因其无需大量模型调整而备受关注,兼具简便性与高效性。然而,现有无需微调方法常难以平衡图像保真度与编辑精度。DDIM反演中的重建误差部分源于U-Net中的交叉注意力机制,在反演与重构过程中引入错位。为此,我们从结构角度分析重建过程,提出一种新方法:以均匀注意力图取代传统交叉注意力,显著提升图像重建保真度。该方法有效减少了噪声预测中因不同文本条件导致的失真。为进一步增强效果,我们引入自适应掩码引导的编辑技术,可无缝集成于重建流程,保障编辑任务的一致性与准确性。实验表明,该方法不仅在高保真图像重建上表现优异,且在真实图像组合与编辑场景中具备强鲁棒性。本研究凸显了均匀注意力图在提升扩散模型图像处理保真度与泛化能力方面的潜力。代码已开源:https://github.com/Mowenyii/Uniform-Attention-Maps。

原文摘要 · Abstract (English)

Text-guided image generation and editing using diffusion models have achieved remarkable advancements. Among these, tuning-free methods have gained attention for their ability to perform edits without extensive model adjustments, offering simplicity and efficiency. However, existing tuning-free approaches often struggle with balancing fidelity and editing precision. Reconstruction errors in DDIM Inversion are partly attributed to the cross-attention mechanism in U-Net, which introduces misalignments during the inversion and reconstruction process. To address this, we analyze reconstruction from a structural perspective and propose a novel approach that replaces traditional cross-attention with uniform attention maps, significantly enhancing image reconstruction fidelity. Our method effectively minimizes distortions caused by varying text conditions during noise prediction. To complement this improvement, we introduce an adaptive mask-guided editing technique that integrates seamlessly with our reconstruction approach, ensuring consistency and accuracy in editing tasks. Experimental results demonstrate that our approach not only excels in achieving high-fidelity image reconstruction but also performs robustly in real image composition and editing scenarios. This study underscores the potential of uniform attention maps to enhance the fidelity and versatility of diffusion-based image processing methods. Code is available at https://github.com/Mowenyii/Uniform-Attention-Maps.

图像重建扩散模型注意力机制

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。