Nodes/KayTool/𝙆 BiRefNet Loader
ComfyUI Node

𝙆 BiRefNet Loader

Pick a background-removal model and a device, once

By kk8bit·Created 2 years ago·Updated about a year ago· 364
𝙆 BiRefNet Loader
    • REMOVE_BG
    model
    providers

    This node's whole job is to load a BiRefNet model once and hand it downstream as a REMOVE_BG-typed output that KayTool's Remove BG node consumes. It's a loader, not a processor - you pick which BiRefNet weight and which hardware to run it on here, then do the actual cutout work in the paired node.

    BiRefNet is the current default recommendation across the ecosystem for cutting subjects out with clean edges - it's what displaced the older u2net-style models for anything with hair, fur, or fine detail, and it's popular enough that ComfyUI added native support for it directly in the core app. That said, it isn't an uncontested win: a rival network called InSPyReNet still beats it in specific side-by-side comparisons people run for themselves, and there's no agreed-upon benchmark settling which is actually better on the hardest cases. Treat BiRefNet as the strong default, not gospel.

    How it works

    model picks which BiRefNet weight to load, and this choice matters more than people expect:

    • BiRefNet - the general-purpose default, trained at a lower native resolution. Good for most cutouts.
    • BiRefNet_HR - trained at a higher native resolution, meant for larger input images. If you're feeding this a big image and getting soft or lower-quality edges out of the base BiRefNet weight, this is the one to try instead - the standard weights internally downscale large inputs, throwing away detail before the model even gets to look at it.
    • BiRefNet-portrait - a specialist weight trained specifically on people, worth trying if your subject is a portrait and the general model isn't nailing hair or skin edges.

    providers picks the hardware backend: auto lets it decide, or you can force cpu, cuda, or mps (Apple Silicon) explicitly if auto-detection isn't picking the one you want.

    The inputs and output that matter

    • model (choice of BiRefNet / BiRefNet_HR / BiRefNet-portrait) - which weight to load.
    • providers (choice of auto / cpu / cuda / mps) - hardware backend.
    • REMOVE_BG (output) - wire this straight into KayTool's Remove BG node.

    Installing it

    Comes with the full KayTool pack: ComfyUI Manager → search KayTool → install → restart, or cd ComfyUI/custom_nodes && git clone https://github.com/kk8bit/KayTool and restart. The model weights themselves aren't part of the git repo - they download from HuggingFace the first time you actually run this node, so the first cutout on a fresh install will pause while it fetches the weight you picked (a few hundred MB to a couple GB depending on which of the three you chose).

    Common issues

    If you spot two near-identical "BiRefNet Loader" nodes in your search results with the same inputs, that's not a bug in your install - KayTool ships this node under two different internal class names (BiRefNet_Loader and Kay_BiRefNet_Loader), almost certainly because "BiRefNet Loader" is a generic enough name that it collides with other packs' own BiRefNet nodes (there are several floating around the ecosystem), and Python-level class-name collisions between custom node packs are a real, recurring problem in ComfyUI. Look for the pack's stylized 𝙆 prefix on the node title to confirm you're using KayTool's version specifically. If the first run hangs, it's almost always the model download - check your connection and available disk before assuming the node is broken. And if providers: auto isn't actually using your GPU, try forcing cuda explicitly rather than trusting auto-detection.

    CategoryKayTool/Remove BG

    Inputs (2)

    NameTypeDefaultDescription
    modelCOMBO3 options: BiRefNet, BiRefNet_HR, BiRefNet-portrait
    providersCOMBO4 options: auto, cpu, cuda, mps

    Outputs (1)

    NameTypeDescription
    REMOVE_BGREMOVE_BG