Nodes/AusBoss/LaMa Inpaint πŸ†Ž
ComfyUI Node

LaMa Inpaint πŸ†Ž

The classic model-based inpaint that refuses to download anything

By ausbossΒ·Created 2 months agoΒ·Updated 3 days agoΒ· 2
LaMa Inpaint πŸ†Ž
  • image
  • mask
  • image
β—„modelbig-lama.ptβ–Ί
β—„previewtrueβ–Ί

LaMa is the elder statesman of inpainting models - the one that removes objects cleanly without a diffusion pass, which is exactly why it still has a job in the age of instruction-edit models. LaMa Inpaint πŸ†Ž wraps the TorchScript big-lama.pt checkpoint: white areas of your mask get replaced, black areas are preserved to the pixel, and the whole thing runs in a fraction of the time a diffusion inpaint would. It's the right tool when you want something gone - a watermark, a power line, a passerby - and you don't need the model to invent new context, just to paint over it convincingly.

How it works

LaMa is a generative inpainting network (not a diffusion model) trained to fill masked regions from surrounding context. The node reads a TorchScript checkpoint from ComfyUI/models/lama/, runs it over your batch, and preserves unmasked pixels exactly. Two details are worth knowing:

  • It never downloads anything. The README is explicit, and the source backs it up: the model folder is registered but never populated or fetched. You place big-lama.pt yourself. That's deliberate - you should know what weights you're running - but it means the node does nothing until you drop the file in, so the first-time experience is: install, run, error, download, run again.
  • Video batches are processed one frame at a time to keep VRAM bounded, with the panel streaming each finished frame during the run. Long clips take a while but won't OOM you.

The inputs are dead simple: image, mask (one mask broadcasts across a whole batch), and the model dropdown (default big-lama.pt, listing what's in your models/lama folder). One output: the inpainted image at the original dimensions.

Install

First the pack:

cd ComfyUI/custom_nodes
git clone https://github.com/ausboss/ComfyUI-AusBoss.git

Restart ComfyUI and search for AusBoss (Manager: ComfyUI-AusBoss). Then the model - the one real setup step:

mkdir -p ComfyUI/models/lama
wget -O ComfyUI/models/lama/big-lama.pt \
  https://github.com/Sanster/models/releases/download/add_big_lama/big-lama.pt

That's a ~200MB TorchScript checkpoint (the release is the same file the rest of the ecosystem calls big-lama.pt). No Python dependencies beyond what ComfyUI ships; minimum ComfyUI 0.27.1.

Troubleshooting

The number one failure is the model not being found - the node's error message tells you to place the checkpoint in ComfyUI/models/lama/, and that's the fix. Make sure it's the TorchScript big-lama.pt, not a .safetensors fine-tune, or loading will fail with a TorchScript error. If results look soft or the mask edge bleeds, that's the model's nature - LaMa is fast and clean, not detail-sharp, so pair it with a proper diffusion inpaint for regions where texture matters. And remember it only handles white-mask regions; there's no invert toggle, so flip the mask upstream if you need the opposite.

CategoryπŸ†Ž AusBoss/Inpaint

Inputs (4)

NameTypeDefaultDescription
imageIMAGEBHWC images or video frames to inpaint.
maskMASKWhite areas are replaced. One mask may be broadcast across the full image batch.
modelCOMBObig-lama.ptTorchScript LaMa checkpoint from ComfyUI/models/lama.
previewoptBOOLEANtrueShow this node's result on its face. Off skips writing the preview file to ComfyUI's temp folder.

Outputs (1)

NameTypeDescription
imageIMAGEInpainted BHWC image batch with the original dimensions and unmasked pixels preserved.