Load Rembg Model
The Model Picker That Barely Picks — Load Rembg Model
- REMBG
Load Rembg Model is the first half of a two-node background-removal pair, and its whole job is picking which rembg segmentation model the rest of the graph runs. It never touches your image. It lists the model files sitting in ComfyUI/models/rembg/, builds a rembg session around the one you choose, and hands that session to its sibling, Rembg Remove background. One dropdown in, one opaque REMBG handle out.
You reach for this pack when you want the classic rembg/u2net route to a cutout - the fast, cheap, CPU-friendly floor for a solid subject on a contrasting background. Product shots, quick extractions, batch work where edges don't have to be perfect. That's the "solved since 2020" tier of the background-removal decision tree; if you need flyaway hair and fine edges you want BiRefNet or InSPyReNet instead, not this.
How it works
The node pulls the filename list from your models/rembg/ folder, then calls rembg's new_session(model_path, providers=["CPUExecutionProvider"]). Two details in that one line are worth knowing:
- It's pinned to CPU. The provider list is hardcoded to
CPUExecutionProvider, so even on a machine with a 4090, inference here runs on your processor. Fine for small images and sparse use; painful for big batches. - It passes a full file path where rembg expects a model name. rembg resolves names against its built-in session classes (
u2net,isnet,silueta, and so on), not arbitrary paths. This is the trap, and it's below.
The one input
model_name - a dropdown populated from whatever files you've dropped into models/rembg/. That's the entire input surface. The README tells you to grab ONNX files from the rembg model list - u2net.onnx (~176 MB) is the classic general-purpose pick, u2netp.onnx is the ~5 MB lightweight.
The catch, and why it matters
Here's the honest part: on current rembg, the dropdown is largely decorative. Since mid-2025 rembg throws ValueError: No session class found for model '<your path>' when you hand it a file path, so this node errors out on a fresh install. On older rembg it did something sneakier - it ignored your chosen file entirely and silently loaded stock u2net from ~/.u2net. Either way, the model you picked isn't really the model that runs.
The pack is unmaintained (last commit April 2025) and its requirements.txt just says rembg with no pin, so you get today's rembg and today's failure mode. If you want this node to actually load your model, you're pinning rembg to a pre-May-2025 version and living with the silent-u2net behavior. For most people the saner move is skipping this pack for a maintained one - ComfyUI-RMBG or ComfyUI-Inspyrenet-Rembg - or, since May 2026, ComfyUI's own native BiRefNet node.
Install
ComfyUI Manager is the easy path - search "comfyui-rembg". Or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/0x-jerry/comfyui-rembg
Then restart ComfyUI. The pack's only declared dependency is rembg; note that modern rembg no longer bundles its ONNX runtime by default, so if importing fails with No module named 'onnxruntime', install it explicitly (pip install "rembg[cpu]", or [gpu]).
When you just want the u2net cutout and none of the model-picker drama, this pair still gets you there - just know the picker isn't doing what it looks like it's doing.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| model_name | COMBO | 0 options: |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| REMBG | REMBG | — |