Inpainting
Inpainting is an image editing technique in which a model fills in a designated region of an image — defined by a binary mask — so that the result is visually coherent with the surrounding, unmasked content. In classical computer vision, inpainting used texture synthesis and PDE-based solvers; in modern generative AI, Diffusion models perform the task by denoising only the masked region while conditioning on the surrounding pixels and, optionally, a text prompt describing what should appear in the masked area.
Think of it like a skilled art restorer who fills in damaged sections of a painting: they study the colors, brushwork, and composition surrounding the gap, then complete the missing area so the whole piece reads as seamless. Unlike a simple copy-paste, the model accounts for lighting, perspective, and style continuity.
A practical workflow: a photographer wants to remove a lamp post from a street scene. They load the image into a tool using a Stable Diffusion inpainting pipeline, draw a mask over the lamp post, and optionally provide the prompt "cobblestone street, overcast sky." The model treats the masked region as pure noise and iteratively denoises it, guided by both the surrounding image context and the text prompt, producing a version of the image where the lamp post is replaced with contextually appropriate background. Popular implementations include DALL-E's edit endpoint, Stable Diffusion inpainting checkpoints, and Adobe Firefly's generative fill.
Inpainting is closely related to Diffusion model architecture, Latent Space manipulation (the denoising occurs in compressed latent space before decoding), and Multimodal models that condition on both text and image inputs; it contrasts with outpainting, which extends an image beyond its original borders.
You will encounter inpainting in photo editing tools, product visualization pipelines (removing watermarks or replacing backgrounds), and in creative AI workflows where controlled, targeted image modification is needed without regenerating an entire scene.