← See All Custom Node Packs

ComfyUI-BRIA_AI-RMBG

832

Run ComfyUI Easily with InstaSD

Skip the complex setup. InstaSD helps creative professionals build workflows and deploy them to the world:

  • One-click deployment
  • Any model, any node
  • Powerful GPUs for rapid iteration
Get Started

BRIA_RMBG_Zho

Documentation for the BRIA_RMBG_Zho Node

Overview

The BRIA_RMBG_Zho node is a component of the ComfyUI-BRIA_AI-RMBG extension, designed specifically for removing backgrounds from images using the BRIA Background Removal v1.4 model. It utilizes an artificial intelligence model to accurately detect and eliminate the background from the input images, outputting a foreground-only image and a corresponding mask. This node is part of an unofficial implementation for ComfyUI, a flexible and customizable user interface.

What This Node Does

The BRIA_RMBG_Zho node processes an input image using the pre-trained BRIA Background Removal model to automatically remove the image's background. This node outputs the image with the background removed along with a mask that indicates the removed areas. It is useful for tasks where subjects need to be isolated from their backgrounds, such as in photo editing, content creation, and video production.

Inputs

The node accepts the following inputs:

  1. RMBG Model: The pre-trained BRIA Background Removal model that has been loaded using the companion node, "BRIA_RMBG Model Loader".
  2. Image: A list of images that you wish to process to remove their backgrounds. These images should be compatible with the ComfyUI format and should be loaded into the interface.

Outputs

This node produces the following outputs:

  1. Image: The processed image(s) with the background removed. Each image retains its original subjects, isolated without their backgrounds.
  2. Mask: The mask output that highlights the areas of the original image that have been removed. This mask can be used for further processing or to perfect the edges of the subject.

How to Use in ComfyUI Workflows

  1. Install the Node: Ensure the ComfyUI-BRIA_AI-RMBG extension is correctly installed by cloning it to your ComfyUI node directory and restarting the interface.

  2. Load the Model: Use the "BRIA_RMBG Model Loader" node to load the BRIA Background Removal model. This step ensures that the requisite model is available for the background removal process.

  3. Input Images: Connect your image source node, which supplies the images you wish to process.

  4. Configure and Connect: Connect the model loader output and the image output to the respective inputs of the "BRIA_RMBG" node.

  5. Process Images: Once connected, initiate the workflow. The node will process the images in batches (if multiple are provided), removing the backgrounds and outputting both the isolated images and corresponding masks.

Special Features and Considerations

  • Batch Processing: Version 1.5 of the tool supports batch processing, allowing multiple images to be processed concurrently. This feature is particularly useful for handling video frames or a large set of images efficiently.

  • Output Masks: The node generates a mask for each processed image. These masks can help in further refining the output in post-processing steps.

  • Model Requirement: The BRIA Background Removal v1.4 model should be downloaded from Hugging Face and properly placed in the relevant directory for the node to function correctly.

  • Device Considerations: While the node is capable of operating on CPUs, performance is optimized when a CUDA-capable GPU is available.

Using the BRIA_RMBG_Zho node in your ComfyUI workflows enables powerful and precise background removal capabilities, facilitating seamless content creation and editing tasks.