Nois Map Guidance: Inversion with Spatial Context for Real Image Editing
Hansam Cho, Jonghyun Lee, Seoung Bum Kim, Tae-Hyun Oh, Yonghyun JeongAbstract:
Text-guided diffusion models have become a popular tool in image synthesis, known for producing high-quality and diverse images. However, their application to editing real images often encounters hurdles primarily due to the text condition deteriorating the reconstruction quality and subsequently affecting editing fidelity. Null-text Inversion (NTI) has made strides in this area, but it fails to capture spatial context and requires computationally intensive per-timestep optimization. Addressing these challenges, we present NOISE MAP GUIDANCE (NMG), an inversion method rich in a spatial context, tailored for real-image editing. Significantly, NMG achieves this without necessitating optimization, yet preserves the editing quality. Our empirical investigations highlight NMG’s adaptability across various editing techniques and its robustness to variants of DDIM inversions.
Official implementation of Noise Map Guidance: Inversion with Spatial Context for Real Image Editing
conda env create -f environment.yaml
conda activate nmg
The nmg_ptp.ipynb is Notebook for NMG with Prompt-to-Prompt editing, capable of performing tasks such as object swap, contextual alterations, face attribute editing, color change, and global editing. To efficiently process these tasks, it's recommended to use a GPU equipped with a minimum of 15GB of VRAM.
The nmg_masactrl.ipynb is Notebook for NMG with MasaCtrl editing, capable of performing tasks such as viewpoint alternation, and pose modification. To efficiently process these tasks, it's recommended to use a GPU equipped with a minimum of 23GB of VRAM.
The nmg_pix2pix.ipynb is Notebook for NMG with pix2pix-zero editing, capable of performing tasks such as dog → cat, and cat → dog. To efficiently process these tasks, it's recommended to use a GPU equipped with a minimum of 11GB of VRAM.
This repository is built upon diffusers, unofficial implementation of prompt-to-prompt, pix2pix-zero pipeline,and MasaCtrl.
@inproceedings{cho2023noise,
title={Noise Map Guidance: Inversion with Spatial Context for Real Image Editing},
author={Cho, Hansam and Lee, Jonghyun and Kim, Seoung Bum and Oh, Tae-Hyun and Jeong, Yonghyun},
booktitle={The Twelfth International Conference on Learning Representations},
year={2023}
}