arXiv(opens in a new tab)cs.CVSep 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2609.10811

Overpainting: Localized Context-aware Diffusion Image Editing

Sam Sartor, Iliyan Georgiev, Michael Fischer, Valentin Deschaintre, Pieter Peers

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

SAM SARTOR, College of William & Mary, USA

ILIYAN GEORGIEV, Adobe Research, United Kingdom

MICHAEL FISCHER, Adobe Research, United Kingdom

VALENTIN DESCHAINTRE, Adobe Research, United Kingdom

PIETER PEERS, College of William & Mary, USA

“wavy detailed teal jade stone surface”

“full of espresso”

Figure

“covered in wavy silk fabric with a purple sheen”

“decorative gold metal bands”

“whispy cloud of faint steam”

Fig. 1. A sequence of localized overpainting edits. We propose to use a trimap as input, with gray representing areas where change may occur and white where change must occur. This provides strong edit localization while simplifying the masking task, as it does not need to be pixel accurate thanks to the gray regions handling borders.

We present “overpainting”, an image editing operation which offers both control over the location of the edit and awareness of the previous content in that location. The overpainted area is given by a trimap, where white-annotated pixels must be edited, gray-annotated pixels may be edited, and black-annotated pixels must not be edited. This enables both precise and loose control, depending on user intent.

We implement overpainting by adapting a pretrained image editing diffusion model using a combination of joint attention and low-rank adaption across input images with attention-dropout to balance the information flow between noise, source and mask images. We present a novel, automated, training data generation pipeline that (1) generates a set of candidate image pairs leveraging existing language-based editing models, (2) carefully curates those pairs, and (3) extracts a trimap from each usable pair. We demonstrate the versatility of our overpainting model on a wide range of editing tasks.

1 Introduction

Image diffusion models allow users to create fantastic images by simply providing a textual description of the picture in their mind. As language is an imprecise tool to describe fine details, diffusion models necessarily must hallucinate that missing information. This generative behavior makes diffusion models an ideal foundation for editing tools. Recently, dedicated image editing diffusion models [Black Forest Labs et al. 2025; Esser et al. 2024; Wu et al. 2025; Z-Image Team 2025] have emerged, allowing the application of high-level identity-preserving editing operations based on multi-modal input such as a source image and a prompt describing the change. However, obtaining satisfactory edits with precise user-directed localization, such as those shown in Figure 1, requires careful prompt engineering. Even for multi-modal models provided with a mask, the models see the mask more as a suggestion than a constraint.

In this paper we introduce a novel diffusion-based editing operation overpainting, which makes local alterations to an image while respecting the previous content (e.g., partially altering an object's surface to be made of stone, or to be covered in hair, as shown in Figs. 1 and 2). After overpainting, the viewpoint, composition, and style of an image will be the same, but depicted objects or parts of objects must differ. Each individual pixel is classified as edited if its color or other features have been meaningfully altered, and unedited otherwise. The key challenge of overpainting is control: allowing the user to specify both which pixels should be edited (via the mask) and how they should be edited (via the prompt).

Specifying an exact editing mask around existing image features is cumbersome and error-prone (e.g., for thin features or precise object boundaries). It is also often ambiguous for edits with ill-defined boundaries (e.g., frost forming on a window or smoke dissipating) and for to-be-created features whose location depends on the target edit itself (e.g., whiskers protruding from an object on which the user asked the model to grow hair). We tackle this challenge by introducing a trimap that marks not only pixels which must be edited (white) and must not be edited (black), but also pixels that may or may not be edited (gray; Fig. 2). In contrast to an inexact binary mask where the marked region has an ambiguous meaning (i.e., it combines “must” and “may be” changed regions), a trimap provides unambiguous semantic meaning for editing each region, allowing the user to apply different strategies to localize edits: binary masks for providing exact control, rough masks with wide gray margins for ‘loose’ control, or strategically placed thin gray masks around intricate details to provide the editing model freedom to blend or modify the intricate details naturally.

We base our overpainting model on a pretrained editing diffusion model [Black Forest Labs et al. 2025], and adapt the model to

Authors' Contact Information: Sam Sartor, College of William & Mary, Williamsburg, USA, ssartor@adobe.com; Iliyan Georgiev, Adobe Research, United Kingdom, igeorgiev@adobe.com; Michael Fischer, Adobe Research, United Kingdom, mifischer@adobe.com; Valentin Deschaintre, Adobe Research, United Kingdom, deschain@adobe.com; Pieter Peers, College of William & Mary, Williamsburg, USA, ppeers@siggraph.org.

• Sartor et al.

Input

Figure

Fig. 2. Trimap variations on an image of an apple with the prompt “wrapped in black twine”. 2nd column: the apple is wrapped by a carefully drawn mask without any gray regions, and the prompt will be exactly applied in the masked regions only. 3rd column: adding gray regions around the mask allows overpainting to make local changes to improve the quality of the results (i.e., more variations in the silhouette of the thread). 4th column: marking a large region of the apple with a gray mask and only including a few white lines provides much greater freedom for overpainting, and consequently less control on the actual content by the user. Last column: marking most of the apple white results in a very densely wrapped apple.

adhere to both the trimap and the image content while retaining the embedded priors as much as possible. To achieve this goal, we balance different information sharing strategies between the different input images (source, mask, and noise, each representing an "image-stream"). In particular, we combine joint attention and Teamwork (i.e., low-rank adaptors (LoRA) across input images [Sartor and Peers 2025]). We observe that both information sharing strategies trade-off complementary aspects: editing quality versus mask adherence. Therefore, we combine joint attention with Teamwork and leverage attention-dropout to balance the flow of information sharing across both mechanisms.

Existing image editing datasets (e.g., MagicBrush [Zhang et al. 2023a] and Pico-Banana-400K [Qian et al. 2025]) are dominated by non-overpainting editing operations such as object insertion, removal, and global edits, making such datasets unsuited for training our overpainting model. Instead, we leverage existing editing models to generate a diverse set of paired training exemplars. Such models are prone to a number of failures (i.e., under-editing, over-editing, and shifting) for which we propose an automatic detection and filtering approach. Finally, we introduce a high-quality hand-crafted overpainting validation set of 180 exemplars.

We demonstrate the versatility of our overpainting model on a wide range of editing examples that are not possible with existing image editing diffusion models.

In summary our contributions are:

(1) overpainting: a novel image editing task utilizing trimaps which combines local control with content-awareness;

(2) a combined information sharing strategy between image-streams for balancing mask adherence versus edit quality control; and

(3) an automated pipeline for generating overpainting training pairs, and a hand-crafted overpainting benchmark comprising 180 exemplars.