Papers › DiffEdit: Diffusion-based semantic image editing with mask guidance

DiffEdit: Diffusion-based semantic image editing with mask guidance

20 Oct 2022arXiv:2210.11427archive 2025-07-28

Guillaume Couairon, Jakob Verbeek, Holger Schwenk, Matthieu Cord

Image generation has recently seen tremendous advances, with diffusion models allowing to synthesize convincing images for a large variety of text prompts. In this article, we propose DiffEdit, a method to take advantage of text-conditioned diffusion models for the task of semantic image editing, where the goal is to edit an image based on a text query. Semantic image editing is an extension of image generation, with the additional constraint that the generated image should be as similar as possible to a given input image. Current editing methods based on diffusion models usually require to provide a mask, making the task much easier by treating it as a conditional inpainting task. In contrast, our main contribution is able to automatically generate a mask highlighting regions of the input image that need to be edited, by contrasting predictions of a diffusion model conditioned on different text prompts. Moreover, we rely on latent inference to preserve content in those regions of interest and show excellent synergies with mask-based diffusion. DiffEdit achieves state-of-the-art editing performance on ImageNet. In addition, we evaluate semantic image editing in more challenging settings, using images from the COCO dataset as well as text-based generated images.

PaperPDFCode

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

Code

Xiang-cd/DiffEdit-stable-diffusion mentioned on GitHubpytorchNOASSERTION report
liuzhengzhe/exim mentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

Not run by Syntology. Nothing on this page verifies that the listed code works.

Tasks

Image Generation

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

DiffusionInpainting

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections