CoCoEdit: Content-Consistent Image Editing via Region Regularized Reinforcement Learning
Yuhui WU ⋅ Chenxi Xie ⋅ Ruibin Li ⋅ Liyi Chen ⋅ Qiaosi Yi ⋅ Lei Zhang
Abstract
Image editing has achieved impressive results with the development of large-scale generative models. However, existing models mainly focus on the editing effects of intended objects and regions, often leading to unwanted changes in unintended regions. We present a post-training framework for $\textbf{Co}$ntent-$\textbf{Co}$nsistent $\textbf{Edit}$ing ($\textbf{CoCoEdit}$) by using region regularized reinforcement learning. We first augment existing editing datasets with refined instructions and masks, from which 40K diverse and high quality samples are curated as training set. We introduce a pixel-level similarity reward that complements MLLM-based rewards, enabling models to ensure both editing quality and content consistency during the editing process. To overcome the spatial-agnostic nature of the rewards, we propose a region-based regularizer, aiming to preserve non-edited regions for high-reward samples while encouraging editing effects for low-reward samples. For evaluation, we annotate editing masks for GEdit-Bench and ImgEdit-Bench, introducing pixel-level similarity metrics to measure content consistency and editing quality. Applying CoCoEdit to Qwen-Image-Edit and FLUX-Kontext, we achieve not only superior editing scores to state-of-the-art models, but also significantly better content consistency, measured by PSNR/SSIM metrics and human subjective ratings. Codes, data and models of CoCoEdit can be found at https://github.com/langmanbusi/CoCoEdit.
Lay Summary
AI image editing tools can make impressive changes from text instructions, but they often alter parts of the image that should stay unchanged. This can make edited images look unnatural or inconsistent with the original content. We present CoCoEdit, a method that helps image editing models make the requested change while better preserving the rest of the image. We also build a new high-quality training set and improve existing benchmarks so that content preservation can be measured more clearly. Experiments on multiple models show that our approach improves consistency without sacrificing editing quality. We hope this work makes AI image editing more reliable and practical for real-world use.
Successful Page Load