ComfyUI Node Runs on cloud

LaMa Loader

Load LaMa for clean object removal

By sipherxyz·Created 3 years ago·Updated 4 months ago· 352
LaMa Loader
    • LAMA
    model_name

    If you just want something gone from an image - a watermark, a passerby, a stray object - and you don't want to spin up a whole diffusion inpainting pipeline to do it, LaMa is the tool, and this node loads it. LaMa is a dedicated object-removal model: mask the thing, and it fills the hole with plausible background. No prompt, no sampler, no CFG, no denoise dial. It's fast, it's clean, and for straightforward "erase this" jobs it often beats a full diffusion pass because it isn't trying to imagine new content - it's reconstructing what the background probably was.

    That's the mental model to keep. Diffusion inpainting (Flux Fill, SDXL inpaint, and the rest) is for replacing a region with something new you describe. LaMa is for removing a region and healing the gap. Different jobs. When someone's tool of choice for wiping out an object cleanly is "Lama Cleaner," this is the same LaMa model, running inside ComfyUI.

    How it works

    LaMa is a resolution-robust inpainting network built to fill large masked areas coherently - it's good at continuing textures and structures across the hole, which is why removals don't leave an obvious smear. This node's whole job is to load the model file and hand it downstream to the pack's LaMa inpainting node, which is where you feed the actual image and mask.

    Inputs and outputs

    One input:

    • model_name - a dropdown of the LaMa weights you've got. Two standard ones: big-lama.pt, the general-purpose model, and anime-manga-big-lama.pt, tuned for illustration and line art. Use the anime variant on drawn content and big-lama on photos.

    The output is LAMA - the loaded model, wired into ArtVenture's LaMa inpaint node alongside your image and mask.

    Installing it

    Ships with the ArtVenture pack. ComfyUI Manager: search comfyui-art-venture, install, restart. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/sipherxyz/comfyui-art-venture
    

    Restart ComfyUI. The node is code, but the LaMa weights are a separate download - you need big-lama.pt (and the anime variant, if you want it) placed where the pack looks for LaMa models. If the model_name dropdown is empty, that's why.

    Common issues

    Empty model_name dropdown. The LaMa weights aren't downloaded, or aren't in the folder the pack scans. Get big-lama.pt in place and restart.

    The removal looks smeared or blurry. LaMa is best at removing objects against reasonably regular backgrounds - sky, walls, grass, bokeh. Ask it to reconstruct a large chunk of a highly detailed, structured scene and it'll do its best but can go soft. For a big hole in a busy background, a diffusion inpaint that can invent detail may look better. Also give the mask a little padding around the object so no fringe pixels survive.

    Wrong model for the content. Running big-lama on anime line art, or the anime model on a photo, gives you a worse fill than matching them up. Pick the variant that matches your image type.

    You expected it to add something, not remove it. LaMa only heals over a mask - it can't put a new object in. If you want to replace rather than erase, that's a diffusion inpainting job, not LaMa.

    CategoryArtVenture/Inpainting

    Inputs (1)

    NameTypeDefaultDescription
    model_nameCOMBO2 options: big-lama.pt, anime-manga-big-lama.pt

    Outputs (1)

    NameTypeDescription
    LAMALAMA