Earngenix Logo
Skip to main content

Glossary · ComfyUI Basics

What Is Inpainting in ComfyUI?

By Earngenix Team ·

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

Dedicated inpaint models — like the Fooocus inpaint patch for SDXL — usually blend mask edges more cleanly than inpainting with a plain checkpoint, especially on complex backgrounds.

Frequently Asked Questions

Not strictly. You can inpaint with a regular checkpoint using the VAE Encode (for Inpainting) node. Dedicated inpaint models, like the Fooocus inpaint patch for SDXL, often blend the edges of the masked area more cleanly.

This is usually a hard mask edge. Feather or expand the mask slightly before inpainting so the transition isn’t a sharp line, and double-check your denoise strength within the masked region.

Yes — a generic or blank prompt can work for simple fixes like removing a small object. A descriptive prompt gives you more control over exactly what fills the masked area.

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

Discussion

Join the discussion

Sign in to leave a comment or reply

💬

No comments yet

Be the first to share your thoughts!