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
- 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 not to use inpainting
- Changing the overall composition — regenerate or use img2img at higher strength.
- Extending the canvas outward; that is outpainting.
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
- 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
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.
Related terms
- Outpainting — Outpainting generates new, coherent image content beyond the original canvas edges, extending a picture outward.
- Denoising strength — Denoising strength controls how much an image-to-image run reshapes the source image, from 0 (untouched) to 1 (source ignored).
- Negative prompt — A negative prompt is text that tells an image, video, or audio generator what to avoid producing — the opposite of the main prompt.
- Seed — A seed is an integer that initializes the random number generator inside an image, video, or audio model, making generation reproducible.
- Image-to-image (img2img) — Image-to-image starts a diffusion generation from an existing image instead of pure noise, restyling or refining it.
Sources
Last updated: 2026-06-02. Raw markdown: https://promtable.com/glossary/inpainting.md.