Region-Aware Diffusion for Zero-shot Text-driven Image Editing

Nisha Huang, Fan Tang, Weiming Dong, Tong-Yee Lee, Changsheng XuarXiv 2023 · DOI

Abstract

Recent advancements in text-to-image generation have revolutionized content creation, yet precise editing of existing images remains a significant challenge. We present the Region-Aware Diffusion Model (RDM), a novel framework designed for zero-shot, entity-level image editing. Unlike existing methods that require manual masking or suffer from global image degradation, RDM automatically identifies target regions through cross-modal calibration and preserves non-edited areas using a specialized latent blending process. Experimental results demonstrate that RDM achieves superior alignment with text prompts and higher image harmonization scores while significantly reducing inference time.

Introduction

Text-driven image editing typically falls into two categories: mask-based editing, which is precise but labor-intensive, and global editing, which often alters unintended regions of the image. The Region-Aware Diffusion Model (RDM) bridges this gap by providing a "zero-shot" solution that requires only text prompts to perform localized edits.

Figure 1: Examples of zero-shot image editing using RDM, showing the transformation of specific entities while preserving the background.

Methodology

The RDM framework is built upon three core technical pillars designed to balance editability with structural preservation.

1. Cross-modal Entity-level Calibration

To eliminate the need for manual masks, RDM utilizes a pre-trained CLIP model paired with a lightweight decoder. This component performs semantic alignment between the "positioning text" (e.g., "A flower") and the input image to generate an accurate binary segmentation mask automatically.

2. Intensive Diffusion Pipeline

The model operates within a Latent Space via a Variational Autoencoder (VAE) to optimize computational efficiency. To ensure the generated content adheres strictly to the target semantics, the system employs Enhanced Directional Guidance. This modification of standard classifier-free guidance provides a stronger push toward the target text's latent representation during the denoising process.

Figure 2: The RDM architecture, highlighting the latent space diffusion process, semantic alignment for mask generation, and directional guidance.

3. Non-Editing Region Preserving (NERP)

A critical challenge in localized editing is preventing "bleeding" effects where changes leak into the background. RDM addresses this through Latent Blending, where the original image's latent representation is merged with the edited latent at every denoising step. Furthermore, a composite loss function—incorporating Learned Perceptual Image Patch Similarity (LPIPS) and Mean Squared Error (MSE)—is applied to penalize deviations in out-of-interest regions.

Experimental Results

RDM was evaluated against state-of-the-art methods such as GLIDE and Blended Diffusion using real-world images and the MS-COCO dataset.

  • Quantitative Performance: RDM achieved a CLIP score of 0.849, indicating high semantic alignment, and an Image Harmonization (IH) score of 20.7, reflecting natural integration of edited components.
  • Efficiency: The model completes an edit in approximately 3 seconds on an RTX 3090, representing a 5x to 9x speedup over competing diffusion-based editors.
  • Qualitative Superiority: Visual comparisons show that RDM maintains high-frequency details in the background (e.g., petal textures or grass) that are often smoothed over by global editing techniques.

Discussion and Limitations

While RDM excels at entity swapping, it faces challenges when there is a significant shape mismatch between the source and target objects (e.g., a round fish to a spindly jellyfish). Additionally, the model is subject to the semantic biases inherent in the CLIP backbone. Future work will focus on enhancing geometric control to handle more complex structural transformations.

Summary updated

BibTeX
@misc{huang2023region,
  author = {Nisha Huang and Fan Tang and Weiming Dong and Tong-Yee Lee and Changsheng Xu},
  title = {{Region-Aware Diffusion for Zero-shot Text-driven Image Editing}},
  year = {2023},
  eprint = {2302.11797},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2302.11797},
}
Figure