Remove Background ♾️Mixlab
One-node background removal in ComfyUI
- image
- masks
- images
- RGBAs
You feed it an image, it hands you back the subject with the background gone. That's the whole pitch, and for product shots, stickers, and clean-edged subjects it does the job in one node with zero fuss. Under the hood this is just rembg - the MIT-licensed background-removal library that's been the community default since 2020 - wrapped as a Mixlab node so you don't have to leave ComfyUI.
What it actually does
Rembg doesn't "erase" anything. It runs a salient-object segmentation network over your image, decides which pixels are foreground, and builds an alpha mask from that. Everything downstream flows from that one mask.
The node gives you three outputs, which is genuinely handy: masks (the raw alpha, for feeding a compositor or an inpaint), images (the subject on transparency, ready to preview or save as PNG), and RGBAs (the same cutout as a proper RGBA type for layer nodes). Wire whichever one your next step wants. All three come out as lists, so a batch in gives a batch out.
The one input that decides your result
There's really only one knob: model_name. This picks which segmentation model rembg loads, and it's the whole ballgame. The pack ships these choices: u2net, u2netp, u2net_human_seg, u2net_cloth_seg, silueta, isnet-general-use, isnet-anime, and briarmbg.
Quick read on which to grab:
- u2net - the historical default. Fast, tiny, runs fine on CPU. Perfectly good on a solid subject against a simple background. Weak on hair, fur, and anything semi-transparent - and that weakness has been true and unfixed since 2020.
- isnet-general-use / isnet-anime - sharper edges than u2net. The anime one is the correct pick for illustration, and it's the one to reach for if u2net is chewing up your line art.
- u2net_human_seg - tuned for people; u2net_cloth_seg parses garments.
- briarmbg (BRIA RMBG) - strong edges, but read the license: BRIA released it for non-commercial use only. Fine for personal work, a landmine if you're shipping a product.
Installing it
Grab the whole pack, not the node alone. Easiest path is ComfyUI Manager: search mixlab, install comfyui-mixlab-nodes by shadowcz007, restart. Manual works too:
cd ComfyUI/custom_nodes
git clone https://github.com/shadowcz007/comfyui-mixlab-nodes
then install its requirements (install.bat on Windows portable, or pip install -r requirements.txt in your venv) and restart.
The catch specific to this node: the rembg weights aren't bundled. First time you pick a model, rembg tries to download it into models/rembg. If your box has no internet or the download flakes, the node throws at run time even though it loaded fine. Pre-seed models/rembg from the rembg model list if you're on an offline or locked-down setup.
Where it falls short
Be honest with yourself about the edge. If your subject is a person with flyaway hair, a veil, a wine glass, smoke - anything genuinely half-transparent - a segmentation model is the wrong tool and no rembg variant fully fixes it. A hard foreground/background label can't represent a pixel that's partly see-through, so the cutout looks clean on a grey preview and then falls apart the moment you composite it onto a colored background.
The modern answer to that problem is BiRefNet or InSPyReNet (matting-aware networks that predict fractional alpha), which ComfyUI now even ships natively. This node doesn't offer those. So: reach for RembgNode_Mix when you want a cutout right now and your edges are cooperative. When hair matters, it's worth stepping outside this pack.
One more thing to know if the whole editor locks up after you drop a Mixlab node on the graph - that's a known JS conflict some users hit with this pack, not something you did wrong. Disabling the pack is the blunt fix; it's unrelated to rembg itself.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| model_name | COMBO | 0 options: |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| masks | MASK | — |
| images | IMAGE | — |
| RGBAs | RGBA | — |