BRIA RMBG
One-node background removal in ComfyUI
- image
- image
- mask
Point it at an image, get the subject cut out with the background gone. That's the node. BRIA's RMBG ("Remove Background") is one of the popular one-click background removers in the ecosystem, and this node wraps it so you can drop it into a ComfyUI graph without thinking about the model underneath. Feed it a photo or a generated image, and out comes both the cutout and the mask that produced it.
Where it fits
Background removal is the most commoditized operation in the whole ecosystem - the models are free, fast, and plural, and by 2026 the interesting question isn't "can it find the subject" but "can it survive hair, fur, and semi-transparency." Nobody has fully won that. BRIA RMBG is a solid, no-fuss default: for a clean subject against a contrasting background it's instant and good. For flyaway hair or a veil it's competing in a field where the honest answer is "test a couple and pick the one whose failures you can live with." It's the right reach for product shots, quick subject extraction, and feeding a clean cutout into a compositing step.
How it works, and the version choice
The model_version input is the one real decision, and it's a generational one:
- 2.0 - the newer model, built on the BiRefNet-style architecture that produces noticeably sharper edges, especially on hair and complex boundaries. This is the one to use unless you have a specific reason not to.
- 1.4 - the older generation. Lighter and faster, edges are acceptable rather than excellent. Fine for simple subjects or constrained hardware; it's the one that struggles on the hard cases.
Default to 2.0 and only drop to 1.4 if speed or memory forces it.
The inputs and outputs that matter
There are only two inputs - model_version (above) and image (what to cut out) - which is part of the appeal. Two outputs:
image- the subject with the background removed (transparent).mask- the alpha mask itself, black-and-white, marking subject versus background.
The mask output is the underrated one. You don't have to accept the automatic cutout; route the mask into your own compositing, into an inpaint, or into a "combine masks" step to refine the selection before you commit. The image output goes straight into a Save Image (as PNG, to keep transparency) or onto a new background.
Installing it
ComfyUI Manager: search ComfyUI-OllamaGemini, install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/al-swaiti/ComfyUI-OllamaGemini
pip install -r requirements.txt
then restart. The RMBG model weights download automatically on first run - so the first use needs an internet connection and pauses while it fetches them. If you'd rather not carry the whole multi-provider pack just for background removal, know that dedicated background-removal packs exist and ComfyUI even ships BiRefNet natively now; this node's advantage is only that it's already here if you installed OllamaGemini for its other nodes.
Where people get burned
Three things. First, licensing - BRIA's RMBG models come with BRIA's own terms, and commercial use is gated in a way most free removers aren't. For hobby work it's a non-issue; if you're shipping a product, read BRIA's license before you build on it rather than after. Second, hard cases - if a cutout looks clean against the grey preview but falls apart against a colored background, you've hit the limit of a hard-mask segmenter on semi-transparent material (veils, glass, smoke); no setting fixes that, you need a matting model. Third, a LoRA-training footgun worth knowing: don't background-remove your training images to "clean" them - it teaches the LoRA to generate blank backgrounds. Removal is for finished images, not datasets.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| model_version | COMBO | 2 options: 1.4, 2.0 | |
| image | IMAGE | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| mask | MASK | — |