@inproceedings{
mao2024magedit,
title={{MAG}-Edit: Localized Image Editing in Complex Scenarios via  \${\textbackslash}underline\{M\}\$ask-Based \${\textbackslash}underline\{A\}\$ttention-Adjusted \${\textbackslash}underline\{G\}\$uidance},
author={Qi Mao and Lan Chen and Yuchao Gu and Zhen Fang and Mike Zheng Shou},
booktitle={ACM Multimedia 2024},
year={2024},
url={https://openreview.net/forum?id=WjqfAUNDSJ}
}
Recent diffusion-based image editing approaches have exhibited impressive editing capabilities in images with one dominant object in simple compositions. However, localized editing in images containing multiple objects and intricate compositions has not been well-studied in the literature, despite its growing real-world demands. Existing mask-based inpainting methods fall short of retaining the underlying structure within the edit region, causing noticeable discordance with their complex surroundings. Meanwhile, attention-based methods such as Prompt-to-Prompt (P2P) often exhibit editing leakage and misalignment in more complex compositions. In this work, we propose MAG-Edit, a plug-and-play, inference-stage optimization method, that empowers attention-based editing approaches, such as P2P, to enhance localized image editing in intricate scenarios. In particular, MAG-Edit optimizes the noise latent feature by encouraging two mask-based cross-attention ratios of the edit token, which in turn gradually enhances the local alignment with the desired prompt. Extensive quantitative and qualitative experiments demonstrate the effectiveness of our method in achieving both text alignment and structure preservation for localized editing within complex scenarios.
MAG-Edit: Localized Image Editing in Complex Scenarios via  Mask-Based Attention-Adjusted Guidance
Qi Mao Lan Chen Yuchao Gu Zhen Fang Mike Zheng Shou