𝙆 RemBG Loader
Rembg's classic models as ComfyUI dropdowns
- REMOVE_BG
The name tells you exactly what this does and nothing more: it's a loader, not the node that actually removes anything. Pick a segmentation model, pick how it runs, and RemBG Loader hands you a ready-to-use model reference to plug into KayTool's companion RemoveBG node, which does the actual cutting. Splitting load-model from apply-model is a deliberate, sensible pattern - you load the model once and can feed it into as many RemoveBG calls as you want in the same graph without reloading it each time.
How it works
This wraps rembg, the standard Python background-removal library that's been the default way to do this since 2020 - it's what popularized one-click background removal for Stable Diffusion workflows back when it landed as an A1111 extension. rembg itself is a thin wrapper around a handful of ONNX segmentation networks; RemBG Loader exposes rembg's model choice and its ONNX Runtime execution provider as plain ComfyUI dropdowns instead of you writing any Python.
Worth knowing up front: the model list here is rembg's classic lineup, not its full modern one. rembg has quietly absorbed newer, sharper-edged models over the years - including several BiRefNet weight variants - but this loader's dropdown sticks to the original five. If your edge quality on hair or fur needs to be genuinely excellent, this node caps out below what's currently possible; ComfyUI itself shipped native BiRefNet support directly in core in May 2026, and that's the better tool to reach for on hard cases specifically.
The inputs and outputs that matter
model- one ofu2net,u2netp,u2net_human_seg,isnet-general-use,isnet-anime.u2netis the historical default: fast, tiny, reliable on a clean or contrasting background, and visibly weak on fine detail like flyaway hair - a known, unfixed limitation since 2020.u2netpis a lighter/faster version of the same idea.u2net_human_segis tuned specifically for people.isnet-general-useandisnet-animeimprove edge quality over u2net; reach for the anime variant on flat-color or line-art subjects.providers-auto,CPU,CUDA, orCoreML.autois the sensible default and lets ONNX Runtime pick.CPUalways works, no dependency headaches, just slower.CUDAneedsonnxruntime-gpuinstalled and matching your CUDA setup.CoreMLis the Apple Silicon / macOS acceleration path.- Output: a loader handle (the pack's own type) that feeds into the RemoveBG node - nothing you'd inspect directly, just wire it onward.
How to install it
Via ComfyUI Manager: search KayTool, install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/kk8bit/KayTool
then restart. One thing specific to this node: rembg downloads the .onnx weight file for whichever model you pick the first time you actually use it, pulling from its own hosted URLs and caching the file locally afterward. So the first run per model needs network access and takes a little while; every run after that is fast and fully offline.
Common issues & troubleshooting
Picked CUDA and it's still slow. This is standard ONNX Runtime behavior, not specific to this node: if the CUDA execution provider isn't actually available - onnxruntime-gpu missing, or a CUDA version mismatch - it tends to fall back to CPU quietly rather than erroring loudly. If CUDA isn't giving you the speedup you expected, check that your environment actually has the GPU-enabled onnxruntime installed, not just the base CPU package.
First run hangs or looks stuck. Almost certainly the one-time model download mentioned above. Check your network connection; subsequent runs with the same model will be fast.
Edges look rough on hair, fur, or anything semi-transparent. That's the model choice talking, not a bug - every option in this dropdown is a segmentation network from rembg's original, pre-BiRefNet lineup. For genuinely hard edge cases, look at ComfyUI's native BiRefNet support or a dedicated BiRefNet node pack instead; this loader's model list was never meant to compete on that front.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| model | COMBO | 5 options: u2net, u2netp, u2net_human_seg, isnet-general-use, isnet-anime | |
| providers | COMBO | 4 options: auto, CPU, CUDA, CoreML |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| REMOVE_BG | REMOVE_BG | — |