Inpainting
Inpainting regenerates a masked region inside an image while keeping the rest untouched, for targeted edits.
Example input
Mask the coffee cup, prompt: "empty wooden table surface", inpaint only masked
In more detail
What it means
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.
Part 1 of 3
When to use it, and when not
Use it for
- 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.
Skip it for
- Changing the overall composition — regenerate or use img2img at higher strength.
- Extending the canvas outward; that is outpainting.
Part 2 of 3
Example
What goes in, and what comes out.
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.
Part 3 of 3
Common mistakes
- 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.
FAQ
Questions readers ask.
What is inpainting?
Inpainting regenerates a masked region inside an image while keeping the rest untouched, for targeted edits.
When should you 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.
When should you not use inpainting?
Changing the overall composition — regenerate or use img2img at higher strength. Extending the canvas outward; that is outpainting.
What are the 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.
Last updated: 2026-06-02. Raw markdown: https://promtable.com/glossary/inpainting.md. Found a mistake? Tell us.