LaMa Remove Object
LaMaInpaint — erase an object from an image without a diffusion model
- image
- mask
- lama_model
- IMAGE
Mask a thing, and this makes it disappear - cleanly, with plausible background filled in behind it. It's the "remove the tourist / powerline / watermark / stray hand" node. Under the hood it's LaMa (Large Mask inpainting), a dedicated object-removal model that has nothing to do with your Stable Diffusion checkpoint. No prompt, no sampler, no seed. You give it an image and a mask, it gives you the image with the masked region seamlessly erased.
That's the distinction worth getting: LaMa isn't generative inpainting where you describe what should appear. It's removal - it looks at the surrounding pixels and reconstructs what was probably behind the object. It's fast, it's deterministic, and for "just get rid of that" it beats spinning up a full diffusion inpaint. Where it shines is backgrounds with texture and structure - walls, sky, grass, water. Where it struggles is erasing something in front of a complex, high-detail subject, because there's no real information about what belongs there.
How it works
LaMa is a feed-forward inpainting network built to handle large masked regions using fast Fourier convolutions, which give it a wide receptive field - it can "see" enough of the image to continue patterns and structures across a big hole, not just smear the nearest edge inward. This node loads that model, feeds it your image and mask, and returns the reconstructed image. One pass, no iterative denoising.
The inputs and outputs that matter
Just two things are required, which is the appeal:
image- the source.mask- the region to erase. White = remove and fill, black = keep. Mask a little past the object's edges; a tight mask often leaves a faint halo of the thing you were trying to delete.
Optional:
device_mode-AUTO,Prefer GPU, orCPU. LaMa is light enough to run on CPU if you're out of VRAM, just slower.AUTOis fine.lama_model- pass a preloadedLAMAmodel in. Leave it and the node handles loading the model itself (downloading on first use).
Output is a single IMAGE with the masked area removed.
How to install it
Ships with the Art Venture pack. ComfyUI Manager → search comfyui-art-venture → Install → restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/sipherxyz/comfyui-art-venture
then pip install -r comfyui-art-venture/requirements.txt and restart. The LaMa model downloads automatically the first time you run the node.
Common issues & troubleshooting
A ghost of the object remains. Almost always a too-tight mask. LaMa fills what you mask; if the object's soft edges, shadow, or reflection sit outside the mask, they survive. Grow the mask a few pixels (or blur/dilate it) to swallow the fringe and the shadow.
The fill looks smeared or invented wrong. LaMa reconstructs from context, so a busy or highly structured background behind the object is genuinely hard - it has no idea what was actually there. For those cases, use LaMa to get a clean-ish base, then do a generative inpaint pass over the same region to add believable detail. LaMa first, diffusion second, is a solid combo.
Model download fails. On a locked-down or offline box the first-run download can't complete. If the node errors on load, check the console - you may need the LaMa weights placed manually or network access opened. On a managed platform with the pack pre-installed, this is already sorted.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| mask | MASK | — | |
| device_modeopt | COMBO | 3 options: AUTO, Prefer GPU, CPU | |
| lama_modelopt | LAMA | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |