# Inpainting

**Source:** https://promtable.com/glossary/inpainting

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

---
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

- 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

- 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.

## Related terms

- [outpainting](https://promtable.com/glossary/outpainting)
- [denoising-strength](https://promtable.com/glossary/denoising-strength)
- [negative-prompt](https://promtable.com/glossary/negative-prompt)
- [seed](https://promtable.com/glossary/seed)
- [img2img](https://promtable.com/glossary/img2img)

## Sources

- [Hugging Face Diffusers — inpainting](https://huggingface.co/docs/diffusers/using-diffusers/inpaint)

*Last updated: 2026-06-02*
---

Original page: https://promtable.com/glossary/inpainting
Maintained by Promtable (https://promtable.com). Content: CC BY 4.0. Cite as "Promtable — https://promtable.com/glossary/inpainting".
Contact: info@vibecodingturkey.com.