ColorEdit: Training-free Image-Guided Color editing with diffusion model
Xingxi Yin, Zhi Li, Jingfeng Zhang, Chenglin Li, Yin Zhang
TL;DR
This work tackles color editing of objects in diffusion-generated images without training, addressing cross-attention leakage and attribute collision between object features and color prompts. It analyzes how object shape is established in early denoising and leverages AdaIN-based cross-attention Value alignment with a reference color image, complemented by self-attention map replacement and latent blending to preserve background. A training-free framework, ColorEdit, is introduced along with COLORBENCH, a new benchmark for color-change evaluation, demonstrating competitive or superior performance against state-of-the-art editing methods on both synthetic and real images. The approach offers practical, training-free color editing capabilities while outlining limitations for small objects and multi-object edits and pointing to future improvements.
Abstract
Text-to-image (T2I) diffusion models, with their impressive generative capabilities, have been adopted for image editing tasks, demonstrating remarkable efficacy. However, due to attention leakage and collision between the cross-attention map of the object and the new color attribute from the text prompt, text-guided image editing methods may fail to change the color of an object, resulting in a misalignment between the resulting image and the text prompt. In this paper, we conduct an in-depth analysis on the process of text-guided image synthesizing and what semantic information different cross-attention blocks have learned. We observe that the visual representation of an object is determined in the up-block of the diffusion model in the early stage of the denoising process, and color adjustment can be achieved through value matrices alignment in the cross-attention layer. Based on our findings, we propose a straightforward, yet stable, and effective image-guided method to modify the color of an object without requiring any additional fine-tuning or training. Lastly, we present a benchmark dataset called COLORBENCH, the first benchmark to evaluate the performance of color change methods. Extensive experiments validate the effectiveness of our method in object-level color editing and surpass the performance of popular text-guided image editing approaches in both synthesized and real images.
