Inpaint (using Model)
Fast LaMa/MAT inpainting, no diffusion required
- inpaint_model
- image
- mask
- optional_upscale_model
- inpainted image
This is the odd one out in the pack, and it's the one worth knowing about specifically because it isn't a diffusion node. No prompt, no KSampler, no checkpoint. You give it an image, a mask, and a small dedicated inpainting model - LaMa or MAT - and it fills the masked region directly, in one fast pass. That makes it the go-to when you want an object gone or a canvas extended and you genuinely don't care what generative model would've put there, you just want it to look plausible.
Where this fits
Everything else in this pack revolves around the Fooocus SDXL patch, which is a diffusion-model trick. This node is a completely separate code path built on older, purpose-trained computer-vision inpainting research - LaMa (Advanced) and MAT are both small CNNs trained specifically to fill holes convincingly, not generate new content from a prompt. That makes them fast and predictable, and genuinely good at the two jobs the README calls out: outpainting and object removal. They're not going to invent a person or add detail that matches a style - for that you still want the diffusion route.
Inputs and outputs
- inpaint_model - from Load Inpaint Model, either LaMa or MAT.
- image / mask - the region to fill.
- seed (INT) - present the way most ComfyUI nodes expose one, though LaMa/MAT are lightweight CNNs rather than samplers, so don't expect it to swing results the way a KSampler seed does.
- optional_upscale_model - hooks in an upscale model so the node can work at a higher effective resolution than the inpaint model's native training size and downsample back, which is worth wiring up if you're seeing soft, blurry fills.
The output is a single inpainted image - a full image, not a latent, so it's ready to save or feed into further processing without a VAE decode step.
Installing it
Same pack as everything else here: ComfyUI Manager, search "ComfyUI Inpaint Nodes," or:
cd ComfyUI/custom_nodes
git clone https://github.com/Acly/comfyui-inpaint-nodes.git
Restart after installing. Then get an actual model - LaMa's big-lama.pt, or MAT's Places_512_FullData_G.pth (or the fp16 safetensors version from Acly/MAT if you'd rather skip a pickle file). Either goes in ComfyUI/models/inpaint.
Common issues
It's a fill tool, not a generator. People occasionally try to wire this into a ControlNet-preprocessor-style role, expecting it to behave like A1111's inpaint_only+lama - it can work that way, but community reports on getting it running cleanly as a preprocessor are mixed, and it's genuinely easier to just use it for its intended job: pre-fill or finish an area directly.
Best paired with a crop step. Because there's no prompt to steer it, giving the model a tightly cropped region (rather than the whole frame) tends to produce cleaner results - the same reasoning behind the popular Inpaint Crop and Stitch workflow pattern. If you have a mask from segmentation or hand-painting that's larger than it needs to be, Mask Bounding Box or Shrink Mask from this same pack can tighten it up first.
Model not showing up in Load Inpaint Model almost always means the file landed in the wrong folder or ComfyUI wasn't restarted after the download - double-check ComfyUI/models/inpaint.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| inpaint_model | INPAINT_MODEL | — | |
| image | IMAGE | — | |
| mask | MASK | — | |
| seed | INT | 00–18446744073709550000 | — |
| optional_upscale_modelopt | UPSCALE_MODEL | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| inpainted image | IMAGE | — |