technique

Inpainting

Inpainting regenerates a masked region inside an image while keeping the rest untouched, for targeted edits.

Inpainting lets a diffusion model rewrite only the pixels you mask, conditioned on the surrounding image plus a prompt, so edits blend seamlessly with what stays. It is the precise, in-frame counterpart to outpainting (which extends beyond the borders). Typical uses: remove an object, swap a subject's outfit, fix a malformed hand, or replace a background. Quality depends on the mask (feather the edges), the prompt (describe what should fill the region, not the whole scene), and the denoising strength applied inside the mask. Most tools also offer "inpaint only masked" to spend the model's resolution budget on the edited area.

When to use inpainting

When not to use inpainting

Example

Input: Mask the coffee cup, prompt: "empty wooden table surface", inpaint only masked
Output: The cup is gone and the table grain continues naturally where it stood.

Common mistakes

FAQ

What is inpainting?

Inpainting regenerates a masked region inside an image while keeping the rest untouched, for targeted edits.

When should I use inpainting?

Removing or replacing a specific object without re-rolling the whole image. Fixing local defects (extra fingers, artifacts, blemishes). Swapping a background, garment, or product while keeping the subject.

What are the most common mistakes with inpainting?

Prompting the whole scene instead of just the masked region. Hard-edged masks that leave visible seams — feather them. Too-high denoising inside the mask, which ignores the surrounding context.

Sources

Last updated: 2026-06-02. Raw markdown: https://promtable.com/glossary/inpainting.md.