Image Rembg (Remove Background)
One-node background removal with u2net
This is the one-node "cut out the subject" button. Image Rembg wraps the well-known rembg library - the same MIT-licensed tool that's been the community's default background remover since 2020 - and hands you back the image with the background gone. No mask painting, no threshold fiddling: feed it an image, get a subject on transparency.
Worth separating this from WAS's other background node. "Image Remove Background (Alpha)" works by color threshold and tolerance, which only helps on flat, contrasting backgrounds. Image Rembg uses an actual segmentation model, so it works on real photos with busy backgrounds. If you only try one, try this one.
How it works
rembg runs a salient-object segmentation network - historically u2net - that predicts which pixels are foreground and knocks out the rest. The background-removal KB is clear on where this sits: u2net is "fast, reliable, tiny, no meaningful VRAM overhead, and it runs on CPU," which is exactly why rembg stayed the default for years. The catch is edge quality: "fine hair, transparent materials (veils, glass), and complex edges all suffer, and that has been true and unfixed since 2020."
So this node is the right tool for a solid subject against a distinguishable background - product shots, a person in a clear scene. It's the wrong tool for flyaway hair or a wine glass. For those the KB points to BiRefNet (now in ComfyUI core) or a matting model, which represent partial transparency that u2net's hard fore/background split simply can't.
Inputs and outputs that matter
The input that matters is the image to process. The output is the image with its background removed - a subject on transparency (RGBA), ready to composite over a new background with Image Blend by Mask or paste elsewhere.
The thing to internalize from the KB: choosing rembg is choosing an interface, and if you're on u2net it's the quality that costs you. The library itself now bundles better weights (isnet, BiRefNet variants), but this WAS node predates that shift and leans on the classic u2net path - good enough for easy subjects, not a hair-and-glass solution.
How to install it
ComfyUI Manager: search was-node-suite-comfyui, install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/WASasquatch/was-node-suite-comfyui
then install the pack's requirements.txt in your ComfyUI venv and restart. This node needs the rembg package, which pulls in onnxruntime, and on first use rembg downloads its model weights (the u2net file, ~170MB) automatically. That first run will pause while it fetches the model - normal, not a hang.
Common issues & troubleshooting
The node errors that rembg isn't installed. rembg is a real dependency and doesn't always come through cleanly with the pack's bulk requirements. Install it into your ComfyUI venv explicitly (pip install rembg, activating the venv first, or the python_embeded route on portable), then restart.
First run stalls, then works. rembg downloads its model on first use. Give it a minute on the first image; subsequent runs are fast.
Edges are chewed up around hair. Expected - this is u2net's known weakness, per the KB, unchanged since 2020. For difficult edges use BiRefNet (native in current ComfyUI) or a matting model instead; no setting on this node fixes a hair fringe a hard mask can't represent.
Don't background-remove your LoRA training set with this. A recurring KB warning worth repeating: stripping backgrounds from training images teaches the LoRA to generate blank backgrounds. This node is for compositing finished images, not for cleaning a dataset.
Whole pack won't import after a ComfyUI update. The standard WAS Node Suite issue - package downgrades vs a ComfyUI bump. Re-run the pack's requirements against the activated venv, or install.bat. Maintenance-only since late 2023.
Inputs (0)
No inputs
Outputs (0)
No outputs