π§ Image Remove Background
Rembg wired straight into your graph
- rembg_session
- image
- IMAGE
- MASK
Background removal has been the most commoditized operation in this whole space since roughly 2020, and it's still not fully settled - the frontier moved from "can it find the subject" to "can it survive hair, fur, and semi-transparency," and nothing has cleanly won that fight. Image Remove Background puts the original, still-solid workhorse of that landscape - rembg, the tool that made this a one-click operation for A1111 users back in March 2023 - directly into a ComfyUI graph.
What it is, and what it isn't
This node is the rembg path specifically, not a wrapper around the newer, sharper-edged models like BiRefNet or InSPyReNet - those live in other packs (or, since May 2026, natively in ComfyUI core). rembg is fast, reliable, tiny, and runs comfortably on CPU. On a solid subject against a contrasting background it's been genuinely good enough since 2020 - that case is effectively solved and paying for a fancier model there buys you nothing. Where it struggles, and has always struggled, is fine hair, fur, and anything semi-transparent (veils, glass, smoke) - a segmentation model like this one produces a hard foreground/background label per pixel, which is structurally the wrong tool for something that's genuinely half-transparent.
How it works
rembg_session is a required input this node doesn't build on its own - you need a companion "Load Rembg Session" node elsewhere in the essentials pack (outside today's batch) to pick which underlying rembg model runs and hand this node a ready session. ImageRemoveBackground then applies that session to image and splits the result into a clean-background IMAGE and its matching MASK.
Inputs and outputs
rembg_session (REMBG_SESSION), image. Outputs: IMAGE, MASK.
Installing it
Via ComfyUI Manager, search "ComfyUI Essentials". Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/cubiq/ComfyUI_essentials
pip install -r requirements.txt
then restart - the rembg Python package is a real dependency this node needs; Manager should pull it in automatically, but a manual clone needs that pip install step run inside the cloned folder. Pack's been maintenance-only since April 2025.
Common issues & troubleshooting
Edges look rough on hair or fur, no matter what you tune. That's rembg's known ceiling, not a misconfiguration - it's been true and largely unchanged since the model this wraps (u2net) shipped in 2020. If you need better edge fidelity on fine detail, this specific node isn't going to get you there; you'd need a BiRefNet- or InSPyReNet-based tool instead, which essentials doesn't ship.
Don't use this to clean a LoRA training set. This is worth repeating because it's the most-repeated non-obvious finding in this space and people reach for background removal here without thinking twice: hard-removing backgrounds from training images teaches a LoRA to produce blank backgrounds, and most trainers fill the transparent pixels with a flat color anyway - so what you actually trained on is "subject on a solid field," not what you wanted. If your trainer supports it, use the alpha channel as a loss mask instead of removing the background outright.
Node errors immediately on rembg_session. You've wired ImageRemoveBackground up without the loader node that actually produces a session - this node has no default session of its own, it strictly consumes one.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| rembg_session | REMBG_SESSION | β | |
| image | IMAGE | β |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | β |
| MASK | MASK | β |