PC-Edit: Prompt-Contrastive Region Discovery and Region-Guided Editing

📅 2026-07-23
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
Existing training-free editing methods struggle to precisely localize editing regions in object replacement tasks, often resulting in residual source objects, constrained generation, or background distortion. This work proposes PC-Edit, a novel framework that introduces, for the first time, a prompt contrast mechanism within multimodal Diffusion Transformers (MM-DiT). By comparing attention maps of image tokens under source and target prompts, PC-Edit directly identifies semantically altered regions and jointly performs region erasure, target generation, and background preservation at each denoising step. Without requiring any training, the method integrates region mask construction with cached key/value feature injection, achieving state-of-the-art performance on both PIE-Bench and the newly introduced EditRegion-Bench, significantly outperforming existing unsupervised approaches in editing accuracy and background fidelity.
📝 Abstract
Replacing an object with one that differs in category or shape requires complete source removal, natural target formation unconstrained by the source silhouette, and preservation of unrelated content. Existing training-free editors either localize edits from terminal predictions under source and target prompts or preserve unrelated content through spatially unselective source-feature reuse without explicit region discovery. Before reaching the terminal predictions, prompt-induced semantic differences undergo additional network transformations that may obscure their spatial localization, reducing localization precision. Spatially unselective feature reuse forces a trade-off between edit completeness and background preservation. Therefore, we propose PC-Edit, a prompt-contrastive framework for training-free MM-DiT editing. PC-Edit contrasts the image-token attention outputs under the source and target prompts, capturing prompt-induced semantic differences directly where text-conditioned information is delivered to image tokens. The same contrast identifies a source-erasure region during inversion and a target-emergence region during denoising. Their union suppresses source remnants while allowing the target object to form naturally. PC-Edit further couples region discovery and background preservation within each sampling step by estimating the current edit region from preceding attention blocks and immediately injecting cached source K/V features outside it in subsequent blocks, thereby protecting unrelated content before the latent update. Experiments on PIE-Bench and our EditRegion-Bench, with human-verified edit-region annotations for single- and multi-object addition and replacement, show that PC-Edit achieves the best editing quality and background preservation among methods without user-specified edit regions.
Problem

Research questions and friction points this paper is trying to address.

image editing
region discovery
background preservation
prompt-based editing
object replacement
Innovation

Methods, ideas, or system contributions that make the work stand out.

prompt-contrastive
region discovery
training-free editing
MM-DiT
attention contrast
🔎 Similar Papers