ComfyUI Node

Load LaMa Model

The boring half of the fastest inpaint in town

By silveroxides·Created 3 months ago·Updated about 17 hours ago· 30
Load LaMa Model
    • lama_model
    model_name
    devicedefault

    Loaders are boring right up until they're the reason nothing works. This one is the front half of the LaMa inpainting pair: it reads a Big LaMa .safetensors file out of ComfyUI/models/lama and hands you a LAMA_MODEL socket to plug into UC_LaMaInpaint. That's the whole job, and when it's done well, that's all you want from it.

    The one thing to know up front: models are never downloaded automatically. This is the single most common failure point for the whole LaMa pair - people install the pack, add the node, and wonder why the dropdown is empty. The answer is that you have to fetch the ~200 MB model file yourself, once, and drop it in the right folder.

    What it loads and where

    The loader lists every .safetensors file it finds in the lama model directory (this pack registers that folder for you). Two official options, both hosted on the author's HuggingFace model repo:

    • Big LaMa - the general-purpose one, great at object/text removal and background continuation.
    • Anime/Manga Big LaMa - a fine-tune tuned for flat-color illustration, where the base model tends to blur or oil-paint.

    Download whichever matches your content, put it in ComfyUI/models/lama/, restart or refresh, and it shows up in model_name.

    The inputs that matter

    • model_name - dropdown of .safetensors files in models/lama. The loader rejects anything that isn't .safetensors with a clear error, so don't drop a .pt or .ckpt in and expect it to work.
    • device - default (whatever ComfyUI is using), CPU, or any visible GPU. The model is small enough that CPU is genuinely usable, but GPU makes the inpaint instant. Pinning a specific GPU is worth it on multi-GPU boxes so the fill doesn't fight your sampler for VRAM.

    Output is a single lama_model, which feeds UC_LaMaInpaint's lama_model input. Nothing else consumes it.

    Where it trips people up

    • Dropdown is empty → the model file isn't in models/lama, or you haven't refreshed since adding it. It never downloads itself, remember.
    • "LaMa loader accepts only .safetensors models." → you have a legacy PyTorch checkpoint. The pack ships scripts/convert_big_lama_to_safetensors.py in its repo for exactly that conversion, or just grab the ready-made .safetensors above.
    • File in the wrong folder → ComfyUI uses its own lama directory, not the pack's. If you dropped it next to the node, the loader can't see it.

    That's the whole node. It's not glamorous, but paired with UC_LaMaInpaint it gives you sub-second object removal, and the only setup cost is one manual download.

    Categoryutils/model

    Inputs (2)

    NameTypeDefaultDescription
    model_nameCOMBOSafetensors model from ComfyUI/models/lama.
    deviceCOMBOdefaultComfyUI default, CPU, or a specific available GPU.

    Outputs (1)

    NameTypeDescription
    lama_modelLAMA_MODEL