# Poster 29207

- Kind: Poster
- Talk page and recording: https://iclr.cc/virtual/2025/poster/29207

> Transcript of the talk's recording (session_asr), made by speech recognition or taken from the host's captions. It may contain errors. The words are the speakers'; listen to the recording on the talk's page before quoting it.

Hi, my name is Yoav Tevel and I will present Edit, Training-Free Object Insertion in Images with Pre-Trained Diffusion Models. This is a joint project with researchers from NVIDIA Research, Tel Aviv University and Bar Ilan University. We tackle the task of adding objects to images from a simple textual prompt without any training. We can add objects to generated images or to real images.
And even generate images step by step like this living room where we had the couch and then the dog and finally the painting. We can separate previous work to two types of approaches. Train a few methods like prompt to prompt and train models such as Eraser. These methods have several problems. They can introduce artifacts to the image.
They sometimes do not add the objects at all. They can add the object to the wrong place in the image. And they can change the source image completely. So what's our approach? Edit is built on top of Flux, a flow matching model that can generate images from noise. The model has self-attention blocks that pass information between the text tokens and the image tokens.
Our method has several components, an extended self-attention mechanism, noise structure transfer, and latent blending. So let's talk about our extended self-attention mechanism. During standard flux generation, the image tokens draw information from the prompt tokens and the image tokens themselves. But we want to keep the background image the same.
So we want to condition our generation on a source image. To do that, we can simply extend the self-attention mechanism to also draw information from tokens of the source image.
But an naive implementation of the extended attention mechanism generates the same source image without the added object. We can rescale the attention values to give more importance to the prompt, but then we notice that the generated image doesn't resemble the source image at all. To understand what's happening here, we take a look at the attention distribution between three sources.
The source image tokens, the prompt tokens and the target image tokens. We notice that a naive implementation gives too much importance to the source image tokens and just copies it. On the other hand, when we change the attention values to give more importance to the target image, we notice that the source image changes completely.
Finally, when we balance the attention between the source and target image, we can get a clean edit that keeps the source image the same with the added object. We also notice that sometimes the added object does not naturally blend with the source image, like this dog in this example. We attribute this problem to the random noise at the beginning of the generation.
Instead, we use a structured noise to start the generation, which is essentially a very noisy version of the source image. When we use this noise for the generation, we can get edits that blend naturally with the source image. Finally, we notice that in some of our edits we change small details in the source image, like the shadows above the bike.
Our idea to fix it is let's localize the added object in the image and blend the latents between the added object and the background of the source image. When we apply the latent blending you can see that we preserve the small details like the shadows in the source image while we added the new object. Edit art performs all baselines both on automatic metrics and user preferences.
We also propose a benchmark to evaluate whether the object was added to a plausible location in the image. Edit again beats all other baselines. In comparison to other methods, our edits are natural and preserve the source image. Edit can also generate images step by step.
and also operates on many different style of images. Main limitation of our method is that it can struggle adding objects to images where the object already exist in the image beforehand. Thank you for listening and please visit our project page.
