Repolode
1038lab

1038lab/ComfyUI-RMBG

A ComfyUI custom node pack for background removal and text-prompted segmentation of objects, faces, clothing and fashion items using many segmentation models.

Open-source alternative to:Remove.bg

Stars
2,197
Forks
139
Open issues
1
Last commit
2 days ago

What is it?

ComfyUI-RMBG adds background removal and segmentation nodes to ComfyUI, the node-based Stable Diffusion workflow tool. It bundles a range of matting and segmentation models, including RMBG-2.0, BiRefNet, BEN2, INSPYRENET, SAM, SAM2, SAM3, GroundingDINO and Florence-2, so users can pick a model suited to portraits, transparent objects, or text-described targets.

The pack provides an RMBG node that outputs a cut-out image with a chosen background color or transparency, along with a binary mask. A Segment node takes tag-style or natural-language prompts to isolate objects. Separate nodes cover face parsing with 19 facial feature categories, clothes segmentation across 18 categories, and fashion and accessory segmentation. Supporting nodes handle mask overlay, mask resizing, image compare, image stitching and object removal.

Models download automatically on first use in most cases, and some (such as VRMBG-3.0) must be placed manually. Options such as sensitivity, processing resolution, mask blur and offset, and an unload toggle that frees GPU VRAM give control over quality and memory use.

Key features

  • 01Background removal with transparent or solid color output and mask output
  • 02Text-prompted object segmentation with SAM, SAM2, SAM3 and GroundingDINO
  • 03Face parsing across 19 facial feature categories
  • 04Clothes segmentation across 18 categories and fashion accessory segmentation
  • 05Mask refinement controls including blur, offset and foreground color estimation
  • 06Option to unload models to release GPU VRAM

Use cases

  • Removing backgrounds from product or portrait photos inside a ComfyUI image pipeline
  • Isolating a specific object or person from a scene using a text description
  • Extracting clothing or fashion items for virtual try-on or dataset preparation
  • Generating masks for inpainting or compositing in Stable Diffusion workflows

Quick start

  1. 1

    Clone the repository into ComfyUI's custom_nodes folder

  2. 2

    Install the Python dependencies from the requirements file

    pip install -r requirements.txt
  3. 3

    Restart ComfyUI and load the RMBG nodes

Things to know

  • GPL-3.0 license requires derivative works to be distributed under the same copyleft terms.
  • Many models have heavy dependencies and may need a GPU for good performance.

In collections

Topics

FAQ

What is ComfyUI-RMBG?
A ComfyUI custom node pack for background removal and text-prompted segmentation of objects, faces, clothing and fashion items using many segmentation models. ComfyUI-RMBG adds background removal and segmentation nodes to ComfyUI, the node-based Stable Diffusion workflow tool. It bundles a range of matting and segmentation models, including RMBG-2.0, BiRefNet, BEN2, INSPYRENET, SAM, SAM2, SAM3, GroundingDINO and Florence-2, so users can pick a model suited to portraits, transparent objects, or text-described targets.
Is ComfyUI-RMBG free to use? What license does it have?
ComfyUI-RMBG is open source under the GPL-3.0 license. Check the license terms before using it in commercial products.
Is ComfyUI-RMBG still maintained?
Actively maintained. The last commit to ComfyUI-RMBG was on Oct 20, 2026.
What can I use ComfyUI-RMBG for?
Removing backgrounds from product or portrait photos inside a ComfyUI image pipeline Isolating a specific object or person from a scene using a text description Extracting clothing or fashion items for virtual try-on or dataset preparation Generating masks for inpainting or compositing in Stable Diffusion workflows
How do I install ComfyUI-RMBG?
Clone the repository into ComfyUI's custom_nodes folder Install the Python dependencies from the requirements file: pip install -r requirements.txt Restart ComfyUI and load the RMBG nodes
Where can I get ComfyUI-RMBG?
The source code and installation instructions are on GitHub: https://github.com/1038lab/ComfyUI-RMBG

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects