Nodes/Comfyui_LG_Tools/InSPyReNet Loader
ComfyUI Node

InSPyReNet Loader

The InSPyReNet loader half of a two-node background remover

By LAOGOU-666·Created 2 years ago·Updated 7 months ago· 369
InSPyReNet Loader
    • INSPYRENET_MODEL
    mode
    torchscript_jit

    InspyrenetRembgLoader is the boring half of a two-node background-removal pair inside ComfyUI's Comfyui_LG_Tools pack. It doesn't remove anything itself - it loads the InSPyReNet model and hands it to its sibling, InspyrenetRembgProcess, which does the actual cutout. You wire the two together and you have a self-contained background remover that needs no external API and no manual model download.

    If you've been around background removal for a while you know InSPyReNet: the ACCV 2022 network that's been fighting BiRefNet for the "best cutout" crown ever since. The KB's background-removal doc is blunt about the state of play - BiRefNet is the default recommendation and now ships in ComfyUI core, but InSPyReNet still wins specific head-to-heads, and one of the highest-scoring bg-removal threads of 2026 called it "absolute magic." There's no leaderboard answer. What this node gives you is the InSPyReNet option without pulling in a big dedicated pack.

    How it works

    The loader wraps the Remover class from the transparent-background library - which is why pip install -r requirements.txt installs that heavy dependency even if you only care about FastCanvas. On first run it downloads the model checkpoint from the plemeri/transparent-background GitHub release and caches it locally, so the first execution needs internet and a minute; after that it's local.

    Two settings matter, both dropdowns:

    • mode - base or fast. Base runs the 1024×1024 checkpoint and is the one you want for quality. Fast uses the 384×384 checkpoint and is noticeably quicker at the cost of edge fidelity. On a portrait with hair, base is usually the difference between usable and not.
    • torchscript_jit - default or on. Turning TorchScript on speeds up inference. The community has reported mixed quality with jit on in the past; if your masks suddenly look worse, flip it back to default and compare.

    What comes out

    A single output: INSPYRENET_MODEL, which is not an image - it's the loaded model, and it only plugs into InspyrenetRembgProcess. That's the whole point of the split. Load once, reuse across as many process nodes as you like, and the model stays in memory instead of being reloaded per image.

    Installing it

    It's part of Comfyui_LG_Tools:

    cd ComfyUI/custom_nodes
    git clone https://github.com/LAOGOU-666/Comfyui_LG_Tools.git
    pip install -r requirements.txt
    

    Or via ComfyUI Manager, searching "Comfyui_LG_Tools", then restart. The transparent-background dependency is the heavy one - it drags in a pile of packages - but you're already in a torch environment, so it's mostly just large, not problematic.

    Common issues

    • First run hangs or fails. It's downloading ckpt_base.pth (~200MB) from GitHub Releases on the first load. Bad proxy or blocked GitHub and it just sits there. Check the ComfyUI console for the download message.
    • "Where's the model file?" You don't manage it - the loader downloads into the pack's model directory automatically. No manual placement.
    • Quality vs. BiRefNet. On very large inputs or genuinely semi-transparent material (veils, glass), InSPyReNet has no HR variant to fall back on the way BiRefNet does. If you're standardising on one remover for production, the KB's advice stands: run both on your own three hardest images before committing.

    It's not glamorous, but it's the correct way to structure a model node: load once, process many. Pair it with InspyrenetRembgProcess and you've got a real background remover with zero API keys and zero web calls.

    Categoryimage

    Inputs (2)

    NameTypeDefaultDescription
    modeCOMBO2 options: base, fast
    torchscript_jitCOMBO2 options: default, on

    Outputs (1)

    NameTypeDescription
    INSPYRENET_MODELINSPYRENET_MODEL