Paint by Inpaint: Learning to Add Image Objects by Removing Them First

## Abstract

Abstract Image editing has advanced significantly with the introduction of text-conditioned diffusion models.
Despite this progress, seamlessly adding objects to images based on textual instructions without requiring user-provided input masks remains a challenge.
We address this by leveraging the insight that removing objects ( Inpaint ) is significantly simpler than its inverse process of adding them ( Paint ),
attributed to the utilization of segmentation mask datasets alongside inpainting models that inpaint within these masks.
Capitalizing on this realization, by implementing an automated and extensive pipeline, we curate a filtered large-scale image dataset containing pairs of images and their corresponding object-removed versions.
Using these pairs, we train a diffusion model to inverse the inpainting process, effectively adding objects into images.
Unlike other editing datasets, ours features natural target images instead of synthetic ones; moreover, it maintains consistency between source and target by construction.
Additionally, we utilize a large Vision-Language Model to provide detailed descriptions of the removed objects and a Large Language Model to convert these descriptions into diverse, natural-language instructions.
We show that the trained model surpasses existing ones both qualitatively and quantitatively, and release the large-scale dataset alongside the trained models for the community.

## 1 Introduction

Image editing plays a central role in the computer vision and graphics communities, with diverse applications spanning various domains.
The task is inherently challenging as each image offers infinite editing possibilities, each with countless potential outcomes.
A particularly intricate editing task is the seamless addition of objects to images in a semantically acceptable manner.
This operation extends beyond generating realistic visuals and demands a nuanced understanding of the global image context.
Parameters such as the object’s location, scale, and style are critical to the fidelity of the edited result.
While many solutions require the user to provide a mask for the target object [, , , ], recent advancements have capitalized on the success of text-conditioned diffusion models to enable a mask-free approach [, ].
Such solutions offer a more convenient and realistic setting; yet, they still encounter challenges, as demonstrated in Fig. 4.

The leading method for such editing, InstructPix2Pix (IP2P) [], proposes to handle the task by synthesizing a large-scale dataset containing triplets of source and target images alongside an editing instruction as guidance.
Under this guidance, a model is trained to transform the source images into the target ones.
While demonstrating some success, the model’s effectiveness is bounded by the quality of the synthesized training data.
In this paper, we introduce an alternative automatic method for creating a large-scale, high-quality dataset for image object addition.
This approach is grounded in the observation that adding objects (paint) is essentially the inverse of removing them (inpaint).
Namely, by using pairs of images, ones containing objects and others with objects removed, an object addition dataset can be established.
This process entails reversing the conventional order by using the original images as the targets for editing and the inpainted images as the source ones.
In practice, we form the dataset by leveraging the abundant images and object masks available in segmentation datasets [, , ] alongside a high-end inpainting model [].
The reversed approach is essential because directly creating image pairs by adding objects with a text-guided inpainting model would require the segmentation of objects that are not originally present in those images.
Unlike the reliance of IP2P on synthetic images for both the source and target, our targets are real natural images, with source images that are also natural outside the edited regions.
Additionally, IP2P mitigates consistency issues between the source and target images using prompt-to-prompt [] and Directional CLIP-based filtering [].
Despite these efforts, it often fails to achieve the desired consistency, in contrast to our approach, which inherently maintains it by construction.

Mask-based inpainting, a key component in constructing our dataset, is generally intended to fill in masked regions rather than specifically removing objects.
This implies that their use for object removal is not guaranteed to be artifact-free.
Such artifacts may include remnants of the original object, the unintentional creation of a new object, or various other distortions.
Given that the outputs of inpainting serve as training data, these artifacts could potentially impair the performance of the resulting models.
To counteract these issues, we propose a comprehensive pipeline of varied filtering and refinement techniques.
Additionally, we complement the source and target image pairs with natural language editing instructions by harnessing advancements in multimodal learning [, , , , , , ].
By employing a Large Vision-Language Model (VLM) [], we generate elaborated captions for the target objects.
Next, we utilize a Large Language Model (LLM) to cast these descriptions to natural language instructions for object addition.
To further enhance our dataset, we incorporate human-annotated object reference datasets [, ] and convert them into adding instructions.
Overall, we combine the sources mentioned above to form an extensive instruction-based object addition dataset, named PIPE (Paint by Inpaint Editing).
Our dataset features approximately $1$ million image pairs, spans over $1400$ different classes, includes thousands of unique attributes, and is accompanied by an evaluation benchmark.

Figure: Figure 2: Build PIPE Dataset. In the PIPE dataset generation phase, two distinct processes are employed: (i) Addition instructions are generated. Illustrated in the figure is the VLM-LLM based instruction generation process, where visual object details are extracted using a VLM and subsequently formulated into an addition instruction with the aid of an LLM. (ii) The input mask, combined with the original image, utilizes a frozen inpainting model to remove the object from the image.

Utilizing PIPE, we train a diffusion model to follow object addition instructions, setting a new standard for adding realistic image objects, as demonstrated in Fig. 1.
Extensive experiments across multiple benchmarks and metrics validate the effectiveness of our model.
Besides the quantitative results, we conduct a human evaluation survey and compare our model to top-performing models, showcasing its improved capabilities.
Furthermore, we demonstrate that PIPE extends beyond mere object addition; by integrating it with additional editing datasets, it can significantly enhance overall editing performance.

Our contributions include,

- •
Introduction of the Paint by Inpaint framework for image editing.
- •
Construction of PIPE, a large-scale, high-quality textual instruction guided object addition image dataset.
- •
Demonstration of a diffusion-based model trained on PIPE, achieving state-of-the-art performance in adding objects to images.

## 2 Related Efforts

### 2.1 Image Editing

Image editing has long been explored in computer graphics and vision[, ].
The field has seen substantial advances with the emergence of diffusion-based image synthesis models [, ], especially with their text-conditioned variants [, , , ].
The application of such models can be broadly categorized into two distinct approaches – mask-based and mask-free.

#### 2.1.1 Mask-Based Editing.

Such approaches formulate image editing as an inpainting task, using a mask to outline the target edit region.
Early diffusion-based techniques utilized pretrained models for inpainting [, , , ], while more recent approaches fine-tune the models specifically for this task [, , ].
These models can be trained with any image paired with a random mask, greatly benefiting them by using large-scale image datasets for supervised learning.
Building upon this methodology, various attempts have been made to advance these techniques, such as replacing the above-mentioned random mask policy with an object detector [], using local mask descriptions [], and improving the robustness to input mask shapes [].
Despite this progress, relying on a user-provided mask for editing makes this setting less preferable in real-world applications.

Figure: Figure 4: Visual Comparison. Comparison of our model with leading editing models, demonstrating superior fidelity to instructions and precise object addition in terms of style, scale, and position, while maintaining higher consistency with original images.

#### 2.1.2 Mask-Free Editing.

This paradigm allows image editing using text conditions without additional masks, utilizing natural language as an intuitive interactive tool.
Kawar et al. [] optimize a model to align its output with a target embedding text.
Bar Tal et al. [] introduce a model that merges an edit layer with the original image.
The Prompt-to-Prompt technique [] adjusts cross-attention layers in diffusion models, aligning attention maps between source and target prompts.
IP2P turns image editing into a supervised task by generating an instruction-based dataset using stable diffusion (SD) [] and an LLM [].
Mask-free techniques are distinguished by their ability to perform global edits such as style transfer or relighting, yet they still exhibit limitations with local edits, such as maintaining consistency outside the requested edit region.
To maintain consistency in their dataset, IP2P utilizes Prompt-to-Prompt for generation and Directional CLIP loss [] for filtering.
Nevertheless, it improves the consistency but only to some extent.
In contrast, our dataset ensures consistency as we strictly limit changes between the source and target images to the edit regions only.
Moreover, by utilizing the abundant segmentation datasets, we gain the advantages of training with large-scale image datasets, a feature typical of mask-based methods.

#### 2.1.3 Instructions-Based Editing.

A few studies have introduced textual instructions to guide image editing, enabling intuitive, mask-free editing without complex prompts [, ].
IP2P facilitates this by leveraging GPT-3 [] to create editing instructions from input image captions.
Following the recent advancements in instruction-following capabilities of LLMs [, ], Zhang et al. integrate human feedback on edited images and devise a reward function that reflects user preferences [].
Our approach takes a different course; it enriches the class-based instructions constructed from the segmentation datasets by employing a VLM [] to comprehensively describe the target object’s attributes and composition, and an LLM [] to transform the VLM outputs into coherent editing instructions.
Our dataset is further enhanced by integrating object reference datasets [, ], which are converted to specific, rich, and detailed object instructions.

### 2.2 Image Editing Datasets

Early editing approaches [, ] limited themselves to using datasets with specific classes without direct correspondence between source and target images [, , ].
Wang et al. proposed EditBench [], a masked-based object editing small-scale dataset curated manually.
Creating datasets of natural images and their natural edited versions
in the mask-free setting is infeasible, as it requires two identical natural images that differ solely in the edited region.
Thus, previous papers proposed various synthetic datasets, with the previously mentioned IP2P’s prompt-to-prompt-based dataset being one of the most popular ones.
MagicBrush [] recently introduced a synthetic dataset that was manually created using DALL-E2 [].
Although this method offers greater accuracy and consistency, the need for manual annotation and monitoring, limits its scalability.
Inst-Inpaint [] leverages segmentation and diffusion inpainting models to develop a dataset focused on object removal, designed to eliminate the segmentation step.
In this paper, we introduce an image editing dataset that surpasses the scale of any currently available dataset, while maintaining a high quality level.
Furthermore, our approach, which involves inverting the inpainting process, uniquely leverages real images as the edit targets, distinguishing it from prior datasets consisting of synthetic data.

### 2.3 Object Focused Editing

The interest in processing specific objects through diffusion models has significantly increased in recent research.
Various methodologies have been developed to generate images of particular subjects [, , ].
Within the editing domain, Wang et al. [] concentrate on mask-based object editing, training their model for inpainting within the boundaries of existing object masks.
Patashnik et al. [] introduces a technique for producing diverse variations of certain objects already present in images.
Similar to our work, SmartBrush [] aims to add objects into images.
However, in contrast to our methodology, it necessitates a input mask from the user.
Instruction-based methods like IP2P and MagicBrush significantly underscore the capability to insert image objects, allocating a considerable portion of their dataset for this purpose.
For instance, $39\%$ of the MagicBrush dataset is dedicated to this task.

## 3 PIPE Dataset

To enhance the efficacy of image editing models, we address a critical shortfall in the availability of large-scale and naturally consistent supervised editing data.
We propose a systematic form of creating such a comprehensive dataset, dubbed PIPE (Paint by InPaint Edit),
which comprises approximately $1$ million image pairs accompanied by diverse object addition instructions.
Our approach stems from the insight that object removal is more straightforward than the more intricate task of object addition.
Our methodology, illustrated in Fig. 3, unfolds in a two-stage procedure.
First, we create pairs of source and target images using object segmentation datasets alongside a high-performing inpainting model.
Following this, we generate a natural language object addition instruction for each pair using various techniques.
In the following section, we describe the proposed pipeline in detail.

Figure: Figure 5: Dataset Filtering Stages. In constructing PIPE, several filtering stages are applied to address inpainting drawbacks. The first row presents a pre-removal filter targeting abnormal object views caused by blur and low quality. The second and third rows illustrate post-removal stages. The second row addresses inconsistencies indicated by a lack of CLIP consensus among three inpainting outputs of the same image, signifying substantial inpainting variance. The third row employs multimodal CLIP filtering to ensure low semantic similarity with the original object name. The final row illustrates a successful removal outcome that does not require filtering.

### 3.1 Generating Source-Target Image Pairs

As a first stage in creating the PIPE dataset, we leverage vast image segmentation datasets. Specifically, we consider COCO [] and Open-Images [], enriched with segmentation mask annotations from LVIS [].
Unifying these datasets results in $889,230$ unique images with over $1,400$ unique classes.
We utilize this diverse corpus for object removal using a SD based inpainting model(^1^11[https://huggingface.co/runwayml/stable-diffusion-inpainting](https://huggingface.co/runwayml/stable-diffusion-inpainting)) [].
To this end, we supply the model with an image, an object mask, and the corresponding object class.
Despite being simpler than addition, removal can still yield suboptimal outcomes.
To address this, we introduce pre-removal and post-removal steps aimed at securing high-quality data.

#### 3.1.1 Pre-Removal.

This step primarily aims to filter the segmentation masks, retaining only objects that are likely candidates for the subsequent object-adding task.
First, we exclude masks of objects according to their size (either too large or too small) and location (near image borders).
Next, we utilize CLIP [] to calculate the similarity between the segmented object and its provided class name.
This similarity is then used to filter out cases of abnormal object views (e.g., blurred objects) and non-informative partial views (e.g., occluded objects); an example of this is provided in the top row of Fig. 5.
To ensure the mask fully covers the entire object, we perform a dilation morphology operation on it.
This phase is crucial as parts of the object left unmasked can lead the inpainting model to regenerate the same object, hindering the removal process [].

#### 3.1.2 Object Removal.

After obtaining the refined masks, we remove the objects using the Stable Diffusion inpainting model [].
Unlike conventional inpainting objectives, which aim at general image completion, our focus centers on object removal.
To this end, we guide the model by equipping it with positive and negative prompts which are designed to to replace objects with non-objects (e.g., background).
The positive prompt is set to “a photo of a background, a photo of an empty place”,
while the negative prompt is defined as “an object, a <class>”, where <class> denotes the class name of the object.
Empirically, combining these prompts demonstrates improved robustness of the removal process.
During the inpainting process, we utilize $10$ diffusion steps and generate $3$ distinct outputs for each input.

#### 3.1.3 Post-Removal.

The last part of our removal pipeline involves employing a multi-step process aimed at filtering and refining the inpainting outputs:

- •
Removal Verification:
For each source image and its three inpainted outputs, we introduce two mechanisms to assess removal effectiveness.
First, we measure the semantic diversity of the three inpainted candidates’ regions by calculating the standard deviation of their CLIP embeddings, a metric we refer to as the CLIP consensus.
Intuitively, high diversity (no consensus) suggests failed object removal, leaving the region with different object elements, as illustrated in the second row of Fig. 5.
Conversely, lower variability (consensus) points to a consistent removal, increasing the likelihood of an appropriate background, as demonstrated in Fig. 5’s two bottom rows.
In practice, the consensus threshold is manually adjusted to either accept or reject the three candidates.
Next, we calculate the CLIP similarity between the inpainted region of each image candidate and the class name of the removed object (e.g., <cat>).
Outputs with similarity above a specified threshold are filtered out.
This procedure, illustrated in the third row of Fig. 5, is referred to as multimodal CLIP filtering.
By introducing the CLIP consensus and multimodal CLIP filtering mechanisms, our verification process ensures the robustness of the object removal.
An example of a candidate passing the filtering stages is shown in Fig. 5’s bottom row.
If multiple candidates pass these stages, the one with the lowest multimodal CLIP score is selected.
- •
Consistency Enforcement:
As image editing models are required to generate manipulations consistent with the source image, we aim to produce consistent source-target pairs.
By conducting $\alpha$-blending between the source and inpainted image using the object mask, we limit differences to the mask area while ensuring a smooth, natural transition between the regions.
- •
Importance Filtering:
In the final removal pipeline step, we filter out instances with marginal semantic importance of the removed object, as these edits are unlikely to be user-requested.
We employ a CLIP image encoder to assess the similarity between the source-target image pair—not limited to the object region—filtering out cases that exceed a manually set threshold.

### 3.2 Generating Object Addition Instructions

The PIPE dataset is designed to include triplets consisting of source and target images, along with corresponding editing instructions in natural language. However, the process outlined in Sec. 3.1 only produces pairs of images and the raw class name of the object of interest.
To address this gap, we introduce three different strategies for enhancing our dataset with instructions: class name-based, VLM-LLM-based, and reference-based.
Incorporating these diverse approaches produces a range of realistic instructions, both concise and detailed, enriching the dataset’s editing scenarios with $1,879,919$ different object addition instructions.

#### 3.2.1 Class name-based.

We augment the raw object class names into object addition instruction using the following format – “add a <class>”.
This approach leads to simple and concise instructions.

#### 3.2.2 VLM-LLM based.

Since class name-based instructions are concise but may lack details that may appear in user prompts, we propose an automatic pipeline designed to produce more varied and comprehensive instructions.
We achieve this by leveraging recent advances in VLMs and LLMs, thereby enriching the instructions with additional object attributes or other fine-grained details.
Specifically, we adopt a two-stage process.
In the first stage, we mask out the non-object regions of the image and insert the image object into a VLM, namely CogVLM(^2^22[https://huggingface.co/THUDM/cogvlm-chat-hf](https://huggingface.co/THUDM/cogvlm-chat-hf)) [], prompting it to generate a detailed object caption.
In the second stage, the caption is reformatted into an instruction.
To this end, we harness the in-context learning capabilities of the LLM by providing it with a few human-annotated examples of the required outputs.
In practice, we utilize Mistral-7B(^3^33[https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2)) [] with $5$ ICL examples and prompt it to generate outputs of varying lengths, aiming to produce a diverse instructions distribution.
Further details of this procedure are provided in the supplementary materials.

#### 3.2.3 Manual Reference based.

To enrich our dataset with nuanced, compositional details about objects, we leverage three datasets containing textual object references: RefCOCO, RefCOCO+ [], and RefCOCOg [].
We transform these references into instructions using the template: “add a <object textual reference>”, where “<object textual reference>” is replaced with the dataset’s object description.

**Table 1: Editing Datasets Comparison. Review of PIPE dataset versus others editing datasets. ✓ signifies fulfillment, ✗ indicates non-fulfillment, and ✓^✗ denotes partial fulfillment, where images are real outside inpainted areas. "–" means no such images are available. "General Classes" indicates a diversity of classes in the dataset.**
| Dataset | Real Source | Real Target | General | $\#$ | $\#$ |
| --- | --- | --- | --- | --- | --- |
|  | Images | Images | Classes | Images | Edits |
| Oxford-Flower [] | ✓ | ✓ | ✗ | 8,189 | 8,189 |
| CUB-Bird [] | ✓ | ✓ | ✗ | 11,788 | 11,788 |
| EditBench [] | ✓^✗ | – | ✓ | 240 | 960 |
| InstructPix2Pix [] | ✗ | ✗ | ✓ | 313,010 | 313,010 |
| MagicBrush [] | ✓ | ✓^✗ | ✓ | 10,388 | 10,388 |
| PIPE | ✓^✗ | ✓ | ✓ | 889,230 | 1,879,919 |

In Table 1, we compare PIPE with other previously available image editing datasets.
As illustrated, the proposed dataset sets a new benchmark in terms of the amount of images and editing instructions.
Notably, it is the only one that offers real target images while also featuring a diversity of classes.
Examples from the dataset are presented in Fig. 6 and in the appendix.

## 4 Model Training

In this section, we detail the methodology used to train an image editing diffusion model using the proposed PIPE dataset, as presented in Fig. 3.
We leverage the SD 1.5 model [], a text-conditioned diffusion model that incorporates a pre-trained variational autoencoder and a U-Net [], which is responsible for the diffusion denoising process within the latent space of the former.
We denote the model parameters as $\theta$, the noisy latent variable at timestep $t$ as $z_{t}$, and the corresponding score estimate as $e_{\theta}$.
Similar to SD, our image editing process is conditioned on a textual instruction $c_{T}$ through a cross-attention mechanism that integrates text encodings with visual representations.
Specifically, we employ classifier-free guidance (CFG) [] to enhance the alignment between the output image and the editing instruction $c_{T}$.
Unlike SD, which generates a completely new image, our method involves editing an existing one.
Thus, similar to the approach used by IP2P, we condition the diffusion process not only on $c_{T}$ but also on the input source image, denoted as $c_{I}$.
Liu et al.[] have shown that a diffusion model can be conditioned on multiple different targets, and CFG can be accordingly modified.
Using CFG necessitates modeling both conditional and unconditional scores.
To facilitate this, during training we set $c_{T}=\varnothing$ with probability $p=0.05$ (without text conditioning), $c_{I}=\varnothing$ with $p=0.05$ (without image conditioning), and $c_{I}=\varnothing,c_{T}=\varnothing$ with $p=0.05$ (without either conditioning).
During inference, we compute the following score estimate using CFG, considering both the instruction and the source image,

$$ $\displaystyle\tilde{e}_{\theta}(z_{t},c_{I},c_{T})$ $\displaystyle=$ $\displaystyle e_{\theta}(z_{t},\varnothing,\varnothing)$ (3) $\displaystyle+\,s_{T}\cdot\left(e_{\theta}(z_{t},c_{I},\varnothing)-e_{\theta} (z_{t},\varnothing,\varnothing)\right)$ $\displaystyle+\,s_{I}\cdot\left(e_{\theta}(z_{t},c_{I},c_{T})-e_{\theta}(z_{t} ,c_{I},\varnothing)\right),$ $$

where $s_{T}$ and $s_{I}$ represent the CFG scales for the textual instruction and the source image, respectively.
Further implementation details and training hyperparameters are provided in the supplementary materials.

Figure: Figure 6: PIPE Datasets Examples.

## 5 Experiments

We conduct a comprehensive series of experiments to evaluate the efficacy of our trained model.
Given that the PIPE dataset is specifically designed for the complex task of object addition, our experiments are tailored to focus on this challenge.
Initially, we outline our experimental setup, including configurations, benchmarks, and baselines.
We then present quantitative results by comparing our approach against other top-performing methods, supplemented by qualitative examples illustrating these comparisons, followed by an in-depth human evaluation survey aimed at gathering qualitative insights into the model’s performance.
Additionally, in the appendix, we provide an ablation study that assesses the contribution of the VLM-LLM pipeline.

### 5.1 Experimental Settings

We consider three benchmarks to evaluate our model’s capabilities in object addition –
(i) PIPE test set: A test set generated using the pipeline described in Sec. 3, on a subset of $750$ images from the COCO validation split.
(ii) MagicBrush []: A synthetic image editing benchmark that includes training and testing sets.
We specifically filter this dataset to focus on object addition tasks, resulting in $144$ edits.
Details of the filtering criteria are provided in the supplementary materials.
(iii) OPA []: An object placement assessment dataset comprising source and target images along with the objects to be added.
We format the object name field into an instruction using the template " Add a <class>."

### 5.2 Quantitative Evaluation

We compare our model with leading image editing models, including Hive [], IP2P [], VQGAN-CLIP [] and SDEdit [].
To this end, we use the common metrics for evaluation [], including model-free and model-based ones.
For the model-free metrics, we utilize the $L_{1}$ and $L_{2}$ distance metrics to measure the pixel-level modification between the ground-truth target image and the editing outcomes, intuitively penalizing inconsistent global changes (i.e., ones that affect non-object regions).
For the model-based metrics, we use CLIP [] and DINO [] image encoders—referred to as CLIP-I and DINO, respectively—to evaluate the semantic similarity between the edited image and the ground-truth target image, with the similarity quantified through cosine similarity.
Furthermore, we follow [] and adopt CLIP-T [] to gauge text-image alignment between local textual descriptions (implied from the edit instruction) and the resulting edited image.

**Table 2: Results on PIPE Test Set.**
| Methods | L1 $\downarrow$ | L2 $\downarrow$ | CLIP-I $\uparrow$ | DINO$\uparrow$ | CLIP-T$\uparrow$ |
| --- | --- | --- | --- | --- | --- |
| Hive [] | 0.088 | 0.021 | 0.892 | 0.709 | 0.183 |
| InstructPix2Pix [] | 0.098 | 0.027 | 0.899 | 0.715 | 0.185 |
| Ours | 0.057 | 0.014 | 0.962 | 0.875 | 0.184 |

PIPE Test Results.
We evaluate our model against leading instruction-following models, Hive and IP2P, using the PIPE held-out test set, and we report the results in Table 4.
As demonstrated by the $L_{1}$ and $L_{2}$ metrics, our model significantly surpasses the baselines, confirming to its high consistency level.
Furthermore, it exhibits a higher level of semantic resemblance to the target ground truth image, as reflected in the CLIP-I and DINO scores.
As for CLIP-T, IP2P obtains marginally better results.

MagicBrush Results.
Next, we evaluate the performance on the MagicBrush test set, as presented in Table 4.
MagicBrush includes source and target prompts in addition to editing instructions; we leverage this to compare our results not only with instruction-following models IP2P and Hive but also with leading prompts-based editing models VQGAN-CLIP and SDEdit.
Our model achieves the best results in both model-free and model-based similarities ($L_{1}$, $L_{2}$, CLIP-I, and DINO) with the target image.
However, while it generally matches the performance of other methods, it does not outperform VQGAN-CLIP in aligning with the text (CLIP-T), which is expected given that VQGAN-CLIP maximizes an equivalent objective during the editing process.
Following the approach of [], we also fine-tuned our model on the small finetuning training object-addition subset of MagicBrush, comparing it against IP2P, which was similarly fine-tuned.
In this setting, our model outperforms IP2P in four out of five metrics, while achieving an equal CLIP-T score.

OPA Results.
In Table 4, we evaluate our model on the OPA dataset.
As demonstrated in the table, our approach achieves the highest performance across all evaluated metrics.

The quantitative evaluations across the benchmarks demonstrate that our model consistently outperforms competing models, affirming not only its high-quality outputs but also its robustness and adaptability across various domains.

### 5.3 Qualitative Examples

Fig. 4 provides a qualitative comparison of our model alongside other top-performing ones.
The results illustrate how the proposed model, in contrast to competing approaches, seamlessly adds synthesized objects into images in a natural and coherent manner, while maintaining consistency with the original images prior to editing.
Furthermore, the examples, along with those in Fig. 1 demonstrate our model’s ability to generalize beyond its training classes, successfully integrating items such as a ”princess”, ”steamed milk”, and ”buttoned shirt”.
Additional examples are provided in the appendix.

### 5.4 Qualitative Evaluation

To complement the quantitative empirical analysis, we conduct a human evaluation survey, comparing our model to IP2P.
To this end, we randomly sample $100$ images from the Conceptual Captions dataset [] and request human annotators to provide reasonable image addition instructions.
Next, we perform the editing process using both models and request a different set of human evaluators to pick the best edit based on the original input and the instructions.
As image addition is a complex task, adopting the methodology of [], we request the evaluators two types of questions – regarding the alignment faithfulness between the result and the edit request and regarding the output’s general quality and consistency.
Overall, we collected $1,833$ individual responses from $57$ different human evaluators.
Our study engaged a pool of random internet users as participants.
To minimize biases and ensure an impartial evaluation, they completed the survey
unaware of the specific research objectives or goals.
Given the human survey results, we quantify the edit faithfulness and output quality of each model using two metrics: (i) the overall global preference measured in percentage and (ii) the aggregated per-image preference in absolute numbers (summed to $100$).
We report these results in Table 5, which showcases a substantial preference by human observers for the outputs of our model, in terms of both following instructions and image quality.
On average, across these tests, the global preference metric indicates that our model is preferred approximately $72.5\%$ of the time, in contrast to IP2P, which is chosen $27.5\%$ of the time.
We provide additional details regarding this survey in the supplementary materials.

**Table 5: Human Evaluation. Comparison of our model and IP2P on edit faithfulness and quality. “Overall” is the percentage of votes for a certain model of all the votes. “Per-image” quantifies the number of images that a model’s outputs were preferred.**
| Methods | Edit faithfulness | Quality |  |  |
| --- | --- | --- | --- | --- |
| Overall [%] | Per-image | Overall [%] | Per-image |  |
| InstructPix2Pix [] | 26.4 | 28 | 28.5 | 31 |
| Ours | 73.6 | 72 | 71.5 | 69 |

## 6 Leveraging PIPE for General Editing

**Table 6: General Editing Results on MagicBrush Test Set. Evaluation of model performance on the Full MagicBrush test set for General Editing Tasks. The model, trained on the combined PIPE and IP2P dataset and fine-tuned on the MagicBrush training set, surpasses the fine-tuned IP2P, the best model to date on this test set, demonstrating the potential of PIPE for enhancing general editing performance.**
| Methods | L1 $\downarrow$ | L2 $\downarrow$ | CLIP-I $\uparrow$ | DINO$\uparrow$ | CLIP-T (G)$\uparrow$ | CLIP-T (L)$\uparrow$ |
| --- | --- | --- | --- | --- | --- | --- |
| IP2P [] | 0.114 | 0.038 | 0.835 | 0.738 | 0.285 | 0.265 |
| IP2P FT [] | 0.087 | 0.034 | 0.884 | 0.830 | 0.296 | 0.271 |
| Ours + IP2P FT | 0.080 | 0.029 | 0.893 | 0.851 | 0.298 | 0.273 |

We explore the application of our dataset within the broader context of image editing, extending its use beyond merely focusing on object addition.
We utilize the IP2P general editing dataset in conjunction with PIPE.
This combined dataset is used to train a diffusion model following the same procedure outlined in Sec. 4.
For evaluation, we utilized the entire MagicBrush test set, comparing our model against the IP2P model, both with and without MagicBrush training set fine-tuning.
Diverging from the object addition concentrated approach,
the model is fine-tuned using the full MagicBrush training set.
Despite rigorous attempts, we were unable to reproduce the results reported in [].
To ensure fairness and reproducibility, all models were run with the same seed.
Evaluations were conducted using the script provided by [], and the official models were employed with their recommended inference parameters.
As illustrated in Table 6, our model sets new state-of-the-art scores for the general editing task, surpassing the current leading models.
In the appendix, we provide a qualitative visual comparison, showcasing the enhanced capabilities of the new model, not limited to object addition.
The results collectively affirm that the PIPE dataset can be combined with any image editing dataset to improve overall performance.

## 7 Discussion

In this work, we introduce the Paint by Inpaint framework, which identifies and leverages the fact that adding objects to images fundamentally is the inverse process of removing them.
Building on this insight, we present PIPE, a large-scale object addition dataset.
This dataset is constructed by harnessing the wealth of available segmentation datasets and utilizing a high-performance mask-based inpainting model.
We demonstrate that training a diffusion model on PIPE leads to state-of-the-art performance in instructing object additions to images.
Additionally, we show that combining it with other editing datasets enhances general editing performance.
Despite these impressive qualitative and quantitative results, some limitations persist.
Firstly, while our data curation pipeline significantly enhances robustness in the object removal phase, it is not entirely immune to errors.
Furthermore, although we employ various methods for generating instructions, the effectiveness of these efforts is constrained by the capabilities of VLMs and LLMs to produce human-like instructions.
We hope that our work will inspire and propel future research endeavors aimed at addressing the limitations identified in our study.

## Supplementary Materials

## Appendix 0.A Additional Model Outputs

In continuation of the demonstrations seen in Fig. 1, we further show a variety of object additions performed by our model in Fig. 7.
The editing results showcase the model’s ability to not only add a diverse assortment of objects and object types but also to integrate them seamlessly into images, ensuring the images remain natural and appealing.

Figure: Figure 7: Additional Object Addition Results of the Proposed Model. The first three rows showcase outcomes from the model trained only with the PIPE dataset. The last row presents results from the same model after fine-tuning on the MagicBrush training set, as detailed in Sec. 5.2.

## Appendix 0.B PIPE Dataset

### 0.B.1 Creating Source-Target Image Pairs

We offer additional details on the post-removal steps described in Sec. 3.1.
The post-removal process involves assessing the CLIP similarity between the class name of the removed object and the inpainted area.
This assessment helps evaluate the quality of the object removal, ensuring no objects from the same class remain.
To measure CLIP similarity for the inpainted area only, we counter the challenge of CLIP’s unfamiliarity with masked images by reducing the background’s influence on the analysis. We do this by adjusting the background to match the image’s average color and integrating the masked area with this unified background color.
A dilated mask smoothed with a Gaussian blur is employed to soften the edges, facilitating a more seamless and natural-looking blend.

To complement the CLIP score similarity, we introduce an additional measure that quantifies the shift in similarity before and after removal.
Removals with a high pre-removal similarity score, followed by a comparatively lower yet significant post-removal score are not filtered, even though they exceed the threshold.
This method allows for the efficient exclusion of removals, even when other objects of the same class are in close spatial proximity.

### 0.B.2 VLM-LLM Based Instructions

Using a VLM and an LLM, we convert the class names of objects from the segmentation dataset into detailed natural language instructions (Sec. 3.2).
Initially, for each image, we present the masked image (featuring only the object) to CogVLM with the prompt:
“Accurately describe the main characteristics of the <class name>.
Use few words which best describe the <class-
name>”.
This process yields an in-depth description centered on the object, highlighting key attributes such as shape, color, and texture. Subsequently, this description is provided to the LLM along with human-crafted prompts for In-Context Learning (ICL), to generate succinct and clear instructions.
The implementation of the ICL mechanism is detailed in Table 7.

Furthermore, we enrich the instructions by including a coarse language-based description of the object’s location within the image, derived from the given mask. To accomplish this, we split the image into a nine-section grid and assign each section a descriptive label (e.g., top-right).
This spatial description is then randomly appended to the instruction with a $25\%$ probability during the training process.

**Table 7: In-Context Learning Prompt. (Top) We provide the model with five examples of captions and their corresponding human-annotated responses. (Bottom) We introduce it with a new caption and request it to provide an instruction.**
| $[\text{{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}{USER<br>}}}]$: Convert the following sentence into a short image addition instruction: |
| --- |
| <caption 0>. |
| Use straightforward language and describe only the <class name 0>. |
| Ignore surroundings and background and avoid pictorial description. |
| $[\text{{\color[rgb]{.75,0,.25}\definecolor[named]{pgfstrokecolor}{rgb}{<br>.75,0,.25}{ASSISTANT}}}]$: <example response 0> |
| $\vdots$ |
| $[\text{{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}{USER<br>}}}]$: Convert the following sentence into a short image addition instruction: |
| <caption 4>. |
| Use straightforward language and describe only the <class name 4>. |
| Ignore surroundings and background and avoid pictorial description. |
| $[\text{{\color[rgb]{.75,0,.25}\definecolor[named]{pgfstrokecolor}{rgb}{<br>.75,0,.25}{ASSISTANT}}}]$: <example response 4> |
| \cdashline1-1 |
| $[\text{{\color[rgb]{0,0,1}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,1}{USER<br>}}}]$: Convert the following sentence into a short image addition instruction: |
| <new caption>. |
| Use straightforward language and describe only the <new class name>. |
| Ignore surroundings and background and avoid pictorial description. |
| $[\text{{\color[rgb]{.75,0,.25}\definecolor[named]{pgfstrokecolor}{rgb}{<br>.75,0,.25}{ASSISTANT}}}]$: |

### 0.B.3 Integrating Instruction Types

As detailed in Sec. 3.2, we construct our instructions using three approaches: (i) class name-based (ii) VLM-LLM based, and (iii) manual reference-based.
These three categories are then integrated to assemble the final dataset.
The dataset includes 887,773 instances each from Class name-based and VLM-LLM-based methods, with an additional 104,373 from Manual reference-based instructions.

### 0.B.4 Additional Examples

In Fig. 8, we provide further instances of the PIPE dataset that complement those in Fig. 6.

Figure: Figure 8: PIPE Datasets Examples.

## Appendix 0.C Implementation Details

As noted in Sec. 4, the training of our editing model is initialized with the SD v1.5 model.
Conditions are set with $c_{T}=\varnothing$, $c_{I}=\varnothing$, and both $c_{T}=c_{I}=\varnothing$ occurring with a $5\%$ probability each.
The input resolution during training is adjusted to 256, applying random cropping for variation.
Each GPU manages a batch size of 128.
The model undergoes training for $60$ epochs, utilizing the ADAM optimizer. It employs a learning rate of $5\cdot 10^{-5}$, without a warm-up phase.
Gradient accumulation is set to occur over four steps preceding each update, and the maximum gradient norm is clipped at 1.
Utilizing eight NVIDIA A100 GPUs, the total effective batch size, considering the per-GPU batch size, the number of GPUs, and gradient accumulation steps, reaches $4096$ $(128\cdot 8\cdot 4)$.

For the fine-tuning phase on the MagicBrush training set (Sec. 5.2), we adjust the learning rate to $10^{-6}$ and set the batch size to $8$ per GPU, omitting gradient accumulation, and train for $250$ epochs.

### 0.C.1 MagicBrush Subset

To focus our analysis on the specific task of object addition, we applied an automated filtering process to the MagicBrush dataset.
This process aims to isolate image pairs and associated instructions that exclusively pertained to object addition.
To ensure an unbiased methodology, we applied an automatic filtering rule across the entire dataset.
The filtering criterion applied retained instructions explicitly containing the verbs "add" or "put," indicating object addition. Concurrently, instructions with "remove" were excluded to avoid object replacement scenarios, and those with the conjunction "and" were omitted to prevent cases involving multiple instructions.

### 0.C.2 Evaluation

In our comparative analysis in Sec. 5.2, we assess our model against leading instruction-following image editing models.
To ensure a fair and consistent evaluation across all models, we employed a fixed seed (0 0) for all comparisons.

Our primary analysis focuses on two instruction-guided models, IP2P [] and Hive [].
For IP2P, we utilized the Hugging Face diffusers model and pipeline(^4^44[https://huggingface.co/docs/diffusers/training/instructpix2pix](https://huggingface.co/docs/diffusers/training/instructpix2pix)), adhering to the default inference parameters.
Similarly, for Hive, we employed the official implementation provided by the authors(^5^55[https://github.com/salesforce/HIVE](https://github.com/salesforce/HIVE)), with the documented default parameters.

Our comparison extends to models that utilize global descriptions: VQGAN-CLIP [] and SDEdit [].
These models were chosen for evaluation within the MagicBrush dataset, as global descriptions are not available in both the OPA and our PIPE dataset.
For VQGAN-CLIP, we used the official code base(^6^66[https://github.com/nerdyrodent/VQGAN-CLIP](https://github.com/nerdyrodent/VQGAN-CLIP)) with the default hyperparameters. For SDEdit, we use the image-to-image pipeline of the Diffusers library(^7^77[https://huggingface.co/docs/diffusers/en/api/pipelines/stable_diffusion/img2img](https://huggingface.co/docs/diffusers/en/api/pipelines/stable_diffusion/img2img)) with the default parameters.

We further evaluated our fine-tuned model against the MagicBrush fine-tuned model, as documented in  [].
Although this model does not serve as a measure of generalizability, it provides a valuable benchmark within the specific context of the MagicBrush dataset.
For this comparison, we employed the model checkpoint and parameters as recommended on the official GitHub repository of the MagicBrush project(^8^88[https://github.com/OSU-NLP-Group/MagicBrush](https://github.com/OSU-NLP-Group/MagicBrush)).

In Fig. 12 and Fig. 13, we provide additional qualitative examples on the tested datasets to complement the ones in Fig. 4.

## Appendix 0.D Human Evaluation

While quantitative metrics are important for evaluating image editing performance, they do not fully capture human satisfaction with the edited outcomes.
To this end, we conduct a human evaluation survey, as explained in Sec. 5.4, comparing our model with IP2P.
Following the approach of [], we pose two questions: one regarding the execution of the requested edit and another concerning the overall quality of the resulting images.
Fig. 9 illustrates examples from our human survey along with the questions posed.
Overall, as our study indicates, our method leads to better results for human perception.
Interestingly, as expected due to how PIPE was constructed, our model maintains a higher level of consistency with the original images in both its success and failure cases.
For example, in the third row of Fig. 9, while IP2P generates a more reliable paraglide, it fails to preserve the original background.

Figure: Figure 9: Human Evaluation Examples. Examples of the qualitative survey alongside the response distribution (our method in red and the baseline in blue). The examples include both successful and failed cases of our model. The first three top examples correspond with a question focused on the edit completion, and the three bottom ones on the resulting image quality.

Figure: Figure 10: Instructions Ablation. Qualitative comparison of model performance when trained on ’short’ template-based instructions versus ’long’ instructions generated through our VLM-LLM pipeline. Models trained on the latter exhibit exhibit superior performance in interpreting complex instructions and closely aligning object additions with editing requests.

**Table 8: Instructions Ablation: A quantitative comparative analysis of model performance, comparing training on ’short’ class-based instructions to ’long’ instructions generated using the VLM and LLM pipeline. This analysis was performed on both the MagicBrush subset and OPA datasets. The results demonstrate that training with VLM-LLM-based instructions significantly enhances performance across both testing datasets, thereby confirming its effectiveness.**
| Train Instructions Type | OPA | MagicBrush |  |  |
| --- | --- | --- | --- | --- |
| L1 $\downarrow$ | CLIP-T $\uparrow$ | L1 $\downarrow$ | CLIP-T $\uparrow$ |  |
| Short Instructions | 0.087 | 0.199 | 0.083 | 0.266 |
| Long Instructions | 0.083 | 0.200 | 0.072 | 0.269 |

## Appendix 0.E Instructions Ablation

We examine the impact of employing our VLM-LLM pipeline, detailed in Sec. 3.2, for generating natural language instructions.
The outcomes of the pipeline, termed "long instructions", are compared with brief, class name-based instructions (e.g., “Add a cat”), referred to as "short instructions".
In Table 8, we assess a model trained on the PIPE image pairs, comparing its performance when trained with either long or short inputs.
The models are evaluated on both the MagicBrush subset and OPA datasets.
MagicBrush features natural free-form directives, akin to our long instructions, while OPA employs short, template-based directives, comparable to our short instructions.
As expected, training with long instructions leads to improved performance on MagicBrush, due to the similar distribution of instructions.
Interestingly, this approach also proves beneficial when tested solely on short instructions, as indicated by the results on OPA.
This demonstrates that training with comprehensive instructions generated by our VLM-LLM mechanism benefits both short and long-instruction scenarios at inference time.
In addition to quantitative results, we provide qualitative results of both models in Fig. 10.
As demonstrated, the model trained with long instructions shows superior performance in interpreting complex instructions that include detailed descriptions and location references, such as "Let’s add a black bear to the stream".

## Appendix 0.F General Editing Examples

As detailed in Sec. 6, our model achieves new state-of-the-art scores for the general editing task.
In Fig. 11, we present a visual comparison that contrasts our model’s performance with that of a model trained without the PIPE dataset.
The results not only underscore our model’s superiority in object additions but also demonstrate its effectiveness in enhancing outcomes for other complex tasks, such as object replacement.

Figure: Figure 11: Visual Comparison on General Editing Tasks. The contribution of the PIPE dataset when combined with the IP2P dataset for general editing tasks, as evaluated on the full MagicBrush test set. The comparison is between a model trained on these merged datasets and a model trained solely on the IP2P dataset, with both models fine-tuned on the MagicBrush training set. The results demonstrate that, although the PIPE dataset focuses solely on object addition instructions, it enhances performance across a variety of editing tasks.

Figure: Figure 12: Visual Comparison on PIPE Test Set. The visual evaluation highlights the effectiveness of our method against other leading models on the PIPE test set. Our model excels in adhering closely to specified instructions and accurately generating objects in terms such as style, scale, and location.

Figure: Figure 13: Visual Comparison on MagicBrush Test Subset. A visual comparison of our method versus leading models within the MagicBrush object addition test subset. It illustrates our model’s superior generalization across varied instructions and datasets, outperforming the other approaches.

## Appendix 0.G Social Impact and Ethical Consideration

Using PIPE or the model trained with it significantly enhances the ability to add objects to images based on textual instructions.
This offers considerable benefits, enabling users to seamlessly and quickly incorporate objects into images, thereby eliminating the need for specialized skills or expensive tools.
The field of image editing, specifically the addition of objects, presents potential risks.
It could be exploited by malicious individuals to create deceptive or harmful imagery, thus facilitating misinformation or adverse effects.
Users are, therefore, encouraged to use our findings responsibly and ethically, ensuring that their applications are secure and constructive.
Furthermore, PIPE, was developed using a VLM [] and an LLM [], with the model training starting from a SD checkpoint [].
Given that the models were trained on potentially biased or explicit, unfiltered data, the resulting dataset may reflect these original biases.

## Peer Reviews

confidence: 4
contribution: 2
initial_rating: 3
presentation: 3
questions: please see weaknesses
soundness: 3
strengths: 1. It introduced of the Paint by Inpaint framework for image editing
2. It constructed PIPE, a large-scale, high-quality, mask-free, textual instruction-guided object addition image dataset.
3. The combination of Paint by Inpaint framework and the PIPE dataset can enhance the performance of adding objects to images.
summary: This paper presents a diffusion model for text-based image editing that seamlessly adds objects into images without user-provided masks. Using a curated dataset of images paired with object-removed versions and diverse natural language instructions, the model achieves superior performance in object addition and editing tasks. The dataset and trained models will be released to advance future research.
weaknesses: 1. Motivation: Currently, there are a lot of methods where new objects are added with the guidance of external signals such as bounding boxes. In this way, many attributes of the objects can be controlled, such as the size and the position of the new object. Are there any unique benefits from the proposed method when compared to these existing methods?

2. It seems that the proposed method is not very practical. Many of the attributes of the generated new object cannot be specified, such as the size, position, etc. The model just randomly add the object to where it "believes" the new object should be. It would be better if authors can share more information / evaluation towards these aspects.

3. The major contribution of the paper could be the new proposed dataset. The technical novelty is relatively weak in the currently version.

---

confidence: 4
contribution: 2
initial_rating: 3
presentation: 3
questions: - The proposed method only supports object addition, which means the editing scenarios are too limited. I highly suggest the authors to enable additional editing operations on their proposed method. 

- Out-of-domain experiments are necessary to evaluate the model's generalization and robustness.
soundness: 2
strengths: - This paper introduces a dataset which is automatically generated by Stable Diffusion. This data might be helpful for the community to evaluate image editing methods. 

- The filtering process might be useful. Researchers can use similar filtering process to get cleaner data.

- This paper provides evaluations through both automatic metrics and user study, validating that the proposed method outperforms baselines on the object addition task.
summary: The paper presents an approach for object addition in image editing by reversing the process of inpainting (object removal). To achieve this, this paper automatically synthesize a dataset (PIPE), and introduce various filtering rules to clean the dataset. Experiment results demonstrate that the proposed method outperforms baselines on the task of object addition. User study is also performed, demonstrating that the proposed methods can achieve better results in terms of instruction faithfulness and visual quality.
weaknesses: - The application scenarios of this method is too limited, as it only supports object addition. In contrast, the baselines mentioned in the paper, such as MagicBrush[1], can address various editing operations, including object addition, object replacement, object removal, action changes, and more. I suggest that the authors continue developing their method so that it can support at least 3-4 image editing operations.

- Object addition without requiring user-provided input masks is not a particularly challenging task, as it can be achieved through various methods. For example, Grounding-DINO could be used to locate the approximate position for the target object. In addition, user-provided masks can offer more precise locations with small overhead. *I.e.*, compared to text instruction, it does not take much extra effort for users to mark the target area. 

- Applying the paint-by-inpaint mechanism in diffusion models is an important contribution of this paper. However, similar mechanism has been widely used in GAN series papers. For instance, GANs often use the image reconstruction task to train models to achieve image editing capabilities, such as ManiGAN[2] or SIMSG[3]. During the image reconstruction process, we can consider that the model automatically completes the process of object removal (inpainting) and addition (painting).

- Since the dataset is generated automatically by the inpainting model, Stable Diffusion, it is possible that the editing model has only learned to reverse Stable Diffusion’s process rather than  editing capabilities. I would like to see experiments on domain generalization. For example, the model could be trained on the dataset constructed by Stable Diffusion, and then evaluated on data generated by other inpainting methods (GLIDE, Imagen) or real-world images.


[1] Zhang, Kai, et al. "Magicbrush: A manually annotated dataset for instruction-guided image editing." NeurIPS 2024.  
[2] Li, Bowen, et al. "Manigan: Text-guided image manipulation." CVPR 2020.  
[3] Dhamo, Helisa, et al. "Semantic image manipulation using scene graphs." CVPR 2020.

---

confidence: 3
contribution: 2
initial_rating: 5
presentation: 2
questions: As shown in Weaknesses.
soundness: 2
strengths: 1. This paper constructs a dataset comprising original images, images with certain objects removed, and corresponding editing instructions. 
2. Utilizing this dataset, the paper trains a network specifically designed to add objects to images.
3. The article is well-written, with clear and precise explanations.
summary: This paper addresses the challenge of seamlessly adding objects to images based on textual instructions without requiring user-provided input masks. The authors leverage the observation that removing objects (Inpainting) is easier than adding them (Painting) due to the availability of segmentation mask datasets. They develop an automated pipeline to create a large-scale dataset of image pairs, where one image is the original and the other is the object-removed version. Using this dataset, they train a diffusion model to reverse the inpainting process, effectively adding objects to images.
weaknesses: 1. In some scenarios, this method may not be applicable. For instance, if there are three tables in the image and I want to place a cup on one specific table, this approach might not work effectively.
2. The comparison method (such as SDEdit and Null-text inversion) were not specifically proposed for the task of adding objects through editing. Comparing with them may not be appropriate, and more suitable comparison methods should be included, such as BrushNet and other mask-based editing methods.

---

confidence: 4
contribution: 2
initial_rating: 5
presentation: 3
questions: Please see the questions in the weakness section.

The main thing I’d like to know is what parts of your dataset construction approach are actually important. In other words, I'd like to see an ablation on the main contributions proposed by the paper.
soundness: 2
strengths: The paper’s approach is reasonable, and it appears to outperform a diverse set of baselines on multiple datasets and across many metrics. In this sense, the comparisons shown in the paper are fairly comprehensive.

There is also significant detail provided in the paper and the supplementary which should help facilitate reproducibility, and the authors also promise to release their dataset which could help future research on this task.

Finally, the paper was relatively clear and easy to follow.
summary: The paper addresses the task of instruction-based image editing, with a specific focus on instructions that add new objects to the image. 

To tackle this task, the authors note that it is much easier to remove an object from an image (e.g., using inpainting) than it is to add one, and so they can create a dataset of paired images with and without an object by using existing models to remove objects. To create editing instructions that align with the paired data, the authors leverage a VLM and an LLM. They further propose a set of quality filtering steps to ensure their dataset contains higher-quality examples. This dataset is used to train an instruction-based model (based on InstructPix2Pix) which outperforms existing baselines on object-adding benchmarks across a wide range of metrics. 

Finally, the authors also demonstrate that their model can be further fine-tuned on general editing data (from e.g., MagicBrush) leading it to outperform InstructPix2Pix on general editing tasks.
weaknesses: My primary concerns are twofold:

First, the core idea of learning to add objects by constructing synthetic data using inpainting already exists in prior published work, including work which was published in conference proceedings before the ICLR deadline (e.g., ObjectDrop, Winter et al, ECCV 2024). I think the authors should, at the very least, tone down their focus on presenting this as a core contribution, and instead highlight other aspects of the work such as the importance of the dataset and its construction.

Second, the authors repeatedly highlight advantages of their data construction approach, such as the fact that their target images are real and not synthetic, but I was unable to find any experiments which support these claims. Considering that the dataset and its construction are the paper’s core contribution, more should be done to ablate different aspects of its creation.

More specifically: the authors show that, as a whole, using their data during training is advantageous. They also ablate their use of VLM+LLM combo to create the editing instructions (in place of simple ‘add <class>’ type of prompts). However, I would have also liked to see experiments that demonstrate that: (1) The extensive data filtering the authors conduct is beneficial (at the very least, filtered data vs. unfiltered data, though if the authors have the compute for it, then more in-depth tests on specific filters would be interesting). (2) There is real advantage to using real images as targets, when compared with simply generating a larger set of synthetic examples. 

The above concern is amplified by the fact that IP2P finetuned on MagicBrush data outperforms the proposed data construction method on most metrics, which signals that some aspects highlighted by the authors (e.g., fully realistic target images) are not as crucial.

Additional, more minor concerns:

a) I am unsure why the original IP2P is referred to as the state of the art on this task when MagicBrush (NeurIPS 2023) have a model (that the authors also use!) which outperforms it. The authors should add comparisons to this model in the qualitative figures, and I’m not sure I understand the reasoning behind arbitrarily splitting it to a different comparison in the quantitative results. The user study experiment should likely also be done against MagicBrush and not against the original IP2P.

b) The images in the paper show noticeable degradation of quality. The images lose a lot of high frequency detail and faces seem distorted (see e.g., lines in the carpet or the hair of Tobey Maguire in Fig 1.). Is this mostly a result of the VAE? Can you report fidelity metrics (e.g., L2) on the background for just VAE reconstruction?

Nits (did not affect my score but should be fixed):

a) In line 400: CLIP is not by Ruiz et al, and they are not remotely the first to use CLIP-T to evaluate image-text alignment, not even in the context of diffusion models or even in the context of model customization or image editing. This line should probably just cite Radford et al.

b) When you cite as “Name et al., (Name et al, 2020)” please use \citet{} to cite as “Name et al. (2020),”.