EditCLIP: Representation Learning for Image Editing

Qian Wang, Aleksandar Cvejić, Abdelrahman Eldesokey, Peter Wonka

TL;DR

This paper introduces EditCLIP, a novel method for learning a unified representation of image edits. EditCLIP enables more effective exemplar-based image editing by replacing text prompts with learned edit embeddings and provides a more reliable metric for automatically evaluating image edits, aligning better with human judgment.

What Problem Does This Paper Address?

Image editing has seen significant advancements with diffusion models, but current methods primarily rely on textual instructions. This approach faces limitations when describing complex edits, artistic styles, or compound modifications. While exemplar-based editing offers an alternative by using example image pairs, existing methods often map these exemplars to text or struggle with diverse editing tasks. Furthermore, evaluating the quality of image edits is challenging, with existing metrics like CLIP scores often failing to capture structural preservation and requiring costly human studies. This paper aims to bridge this gap by learning a representation that implicitly encodes edits, making them easier to transfer and evaluate.

Methods

The core of EditCLIP is a representation-learning approach that learns to encode the transformation between an input image and its edited counterpart. This is achieved by modifying the visual encoder of a pre-trained CLIP model. Instead of processing a single image, the modified encoder takes a concatenated pair of the original and edited images. This allows it to learn an "edit embedding" that captures the specific changes made.

For exemplar-based image editing, EditCLIP replaces the text encoder in existing diffusion models like InstructPix2Pix. The learned edit embedding from a reference image pair is used as a conditioning signal to guide the diffusion process, enabling the model to apply similar edits to a new query image without explicit textual instructions.

For automated evaluation of image edits, EditCLIP leverages its learned embeddings. Two metrics are proposed:

  • EC2T (EditCLIP-to-Text): Measures the similarity between the EditCLIP embedding of an edited image and the embedding of its corresponding textual instruction.
  • EC2EC (EditCLIP-to-EditCLIP): Measures the similarity between the EditCLIP embedding of a reference edit pair and the EditCLIP embedding of a query image and its edited version.

These metrics are designed to capture both the quality of the edit and the preservation of the original image structure, aiming to better align with human perception.

Datasets

The primary dataset used for training and evaluation is InstructPix2Pix (IP2P), which provides around 313k filtered triplets of input images, edited images, and textual editing instructions. For evaluating exemplar-based image editing, the authors adapt the TOP-Bench dataset, creating a benchmark named TOP-Bench-X. This benchmark is used to assess the performance of exemplar-based editing methods and to validate the proposed metrics against human judgments.

Key Insights and Ideas

  • Implicit Edit Representation: The most significant insight is the development of a unified, implicit representation for image edits that goes beyond textual descriptions. This allows for more nuanced and complex edits to be captured and transferred.
  • EditCLIP as a Plug-and-Play Module: EditCLIP's ability to seamlessly replace the text encoder in existing diffusion models makes it highly versatile and easy to integrate into current editing pipelines.
  • Beyond Global Edits: The visualization of EditCLIP's attention shows a focus on the regions of change, indicating its capability to capture localized edits, unlike standard CLIP which tends to have dispersed attention.
  • Evaluation Metrics Matter: The paper highlights the limitations of existing CLIP-based metrics for edit evaluation and proposes new metrics (EC2T, EC2EC) that better correlate with human perception of edit quality and structural preservation.

Key Results

  • Exemplar-Based Editing: EditCLIP outperforms state-of-the-art exemplar-based methods on the TOP-Bench-X benchmark, achieving superior edit quality and input preservation according to human evaluations. Notably, it achieves this with significantly fewer parameters than methods like InstaManip.
  • Automated Evaluation: The proposed EC2T and EC2EC metrics show a higher Pearson correlation with human judgments compared to existing CLIP-based metrics, demonstrating their reliability for automated evaluation.
  • Efficiency: EditCLIP is shown to be faster than other methods, particularly those relying on test-time optimization or large Vision-Language Models.

Limitations and Future Work

  • Dataset Bias: EditCLIP is trained solely on the IP2P dataset, which may lack certain types of edits like deformations or removals. Expanding the training data with more diverse datasets is suggested to improve the embedding space.
  • Future Directions: The authors propose applying EditCLIP to downstream tasks such as instruction caption generation, query-based editing pair retrieval, and extending it to video and 3D editing. They also suggest exploring advanced training strategies and incorporating masks for finer control.

Summary updated

BibTeX
@inproceedings{wang2025editclip,
  author = {Qian Wang and Aleksandar Cvejić and Abdelrahman Eldesokey and Peter Wonka},
  title = {{EditCLIP: Representation Learning for Image Editing}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2025},
  url = {https://openreview.net/forum?id=OMzzKYKwGD},
}
Figure