⚡ Quick Answer
Inpainting is a technique that regenerates only a masked part of an image, based on your prompt, while leaving everything outside the mask untouched. You paint over the area you want changed — an object to remove, a detail to fix — and ComfyUI fills it back in, blended into the rest of the picture.
Regenerating a whole image from scratch to fix one small problem usually changes everything else too. Inpainting solves that: it treats your mask as the only part that's allowed to change, so the rest of the composition, lighting, and detail stays exactly as it was.
Where You'll See It
You draw the mask directly on a loaded image using ComfyUI's built-in Mask Editor. That mask feeds into a VAE Encode (for Inpainting) node — or an InpaintModelConditioning node if you're using an inpaint-aware model — which produces a masked latent. The KSampler then only denoises the masked area; everything outside it is preserved from the original image.
Quick Example
Removing a stray object from a photo: load the image, mask over the object in the Mask Editor, and write a prompt describing what should appear instead — "empty grass field," for example. Run the KSampler with a denoise strength close to 0.8–1.0 within the masked area, and the object gets replaced while the rest of the photo stays identical.
Frequently Asked Questions
See It In Action
Ready to fix a real photo?
Our in-paint and out-paint guide walks through the full mask-to-mesh pipeline with real examples.
Published: 2026-08-25 · Last updated: 2026-08-25
Join the discussion
Sign in to leave a comment or reply
No comments yet
Be the first to share your thoughts!
