ComfyUI-RMBG Project Overview
A ComfyUI custom node for image background removal and segmentation.
Verified
Core facts
Read by a script from the official API, not rewritten by a model.
- Repository
- https://github.com/1038lab/ComfyUI-RMBG
- License
- GPL-3.0
- Languages
- Python
- Maintainer
- 1038lab
- Verified
What it is
ComfyUI-RMBG is a ComfyUI custom node for image background removal and segmentation of objects, faces, clothing, and fashion elements. It requires ComfyUI. It requires Python 3.10 or higher.
The required packages are installed automatically. It is licensed under the GPL-3.0 License.
Main features
The RMBG node supports the models RMBG-2.0, INSPYRENET, BEN, and BEN2 for background removal.
The RMBG node supports batch processing.
The Segment node provides text-prompted object detection.
The Segment node supports both tag-style and natural language inputs.
SAM2 Segmentation provides text-prompted segmentation with SAM2 models (Tiny, Small, Base+, Large).
SAM2 Segmentation downloads models automatically on first use, with a manual download option.
SAM3 Multiplex Segmentation offers merged or separate multi-segment output modes, confidence thresholds, and segment picking.
Getting started
One installation method is to search for the node in ComfyUI-Manager and install it.
Another installation method is to clone the repository to the ComfyUI custom_nodes folder.
Another installation method is to install via Comfy CLI.
Most models can be downloaded automatically on first use, while VRMBG-3.0 requires manual download due to official BRIA license terms.
In basic usage, the RMBG (Remove Background) node is loaded from the AILab RMBG category.
In basic usage, an image is connected to the input.
./ComfyUI/python_embeded/python -m pip install -r requirements.txt cd ComfyUI/custom_nodes
git clone https://github.com/1038lab/ComfyUI-RMBG ./ComfyUI/python_embeded/python -m pip install -r requirements.txt comfy node install ComfyUI-RMBG ./ComfyUI/python_embeded/python -m pip install -r requirements.txtWho it is for
In basic usage, a model is selected from the dropdown menu. The sensitivity parameter controls the background removal sensitivity, with a range of 0.0-1.0. The process_res parameter sets the processing resolution, from 512-2048 in steps of 128.
The mask_blur parameter sets the blur amount for the mask, from 0-64. The mask_offset parameter adjusts mask edges, from -20 to 20. The background parameter chooses the output background color.
The invert_output parameter flips the mask and image output. The RMBG node outputs a MASK, which is a binary mask of the foreground. ComfyUI-RMBG was updated to v3.3.0 on 2026/10/20.
Version v3.3.0 added native FP16 acceleration for RMBG-2.0 and BiRefNet with automatic intermediate VRAM clearing. Version v3.2.0 added native Apple Silicon (MPS) GPU acceleration for macOS.
Sources
This page is written from the official sources below. Open them to check the original text.
- GitHub READMEhttps://github.com/1038lab/ComfyUI-RMBGFetched
Verified ·
This page is written by AI from the official sources above and checked automatically. This site has not tested it. Found a mistake? Tell us.