Install this extension via the ComfyUI Manager by searching
for ComfyUI_BiRefNet_ll
1. Click the Manager button in the main menu
2. Select Custom Nodes Manager button
3. Enter ComfyUI_BiRefNet_ll in the search bar
After installation, click the Restart button to
restart ComfyUI. Then, manually
refresh your browser to clear the cache and access
the updated list of nodes.
Visit
ComfyUI Online
for ready-to-use ComfyUI environment
ComfyUI_BiRefNet_ll integrates BiRefNet for enhanced functionality, featuring nodes like AutoDownloadBiRefNetModel, LoadRembgByBiRefNetModel, and RembgByBiRefNet to streamline model downloading and background removal processes.
ComfyUI_BiRefNet_ll Introduction
ComfyUI_BiRefNet_ll is an extension designed to enhance the capabilities of the ComfyUI by integrating the BiRefNet model for high-resolution dichotomous image segmentation. This extension allows AI artists to easily remove backgrounds from images, making it an invaluable tool for creating clean and professional visuals. Whether you're working on general images, portraits, or specific tasks like concealed object detection, ComfyUI_BiRefNet_ll provides a robust solution to streamline your workflow.
How ComfyUI_BiRefNet_ll Works
ComfyUI_BiRefNet_ll leverages the power of the BiRefNet model, which is designed for high-resolution image segmentation. Think of it as a highly skilled digital pair of scissors that can precisely cut out objects from their backgrounds. The model uses advanced algorithms to distinguish between the foreground (the main subject) and the background, allowing you to isolate the subject with high accuracy. This process involves analyzing the image at a pixel level to create a mask that separates the foreground from the background.
ComfyUI_BiRefNet_ll Features
AutoDownloadBiRefNetModel
Description: Automatically downloads the required BiRefNet models to the models/BiRefNet directory.
Customization: This feature does not support downloading weight models.
LoadRembgByBiRefNetModel
Description: Loads the BiRefNet model from the models/BiRefNet directory or a specified path in an extra YAML file.
Customization: Supports both new and old BiRefNet models. When the use_weight parameter is set to True, it requires downloading the weight models.
RembgByBiRefNet
Description: This node is used to perform the actual background removal using the BiRefNet model.
Customization: You can choose different models and adjust parameters to fine-tune the background removal process.
ComfyUI_BiRefNet_ll Models
Latest Models:
General: A pre-trained model for general use cases.
General-Lite: A lightweight version of the General model for faster performance.
Portrait: Specifically trained for human portraits.
DIS: Designed for dichotomous image segmentation.
HRSOD: High-resolution salient object detection.
COD: Concealed object detection.
DIS-TR_TEs: A model trained on a massive dataset for enhanced performance.
Old Models:
BiRefNet-DIS_ep580.pth: An older version of the DIS model.
BiRefNet-ep480.pth: Another older model for general use.
Solution: Ensure that the model files are correctly named and placed in the models/BiRefNet directory. If using AutoDownloadBiRefNetModel, verify that the download process completed successfully.
Background Removal Not Accurate:
Solution: Try using a different model that better suits your image type. For example, use the Portrait model for human subjects.
Slow Performance:
Solution: Use the General-Lite model for faster performance, especially on lower-end hardware.
Frequently Asked Questions
Q: Can I use this extension for video background removal?
A: Currently, ComfyUI_BiRefNet_ll is optimized for image background removal. For video, consider using specialized video editing software.
Q: Do I need a powerful GPU to use this extension?
A: While a powerful GPU can speed up the process, the General-Lite model is designed to work efficiently on less powerful hardware.
Learn More about ComfyUI_BiRefNet_ll
For additional resources, tutorials, and community support, you can explore the following links:
Colab Demo for Box-Guided Segmentation
These resources will help you get the most out of ComfyUI_BiRefNet_ll and connect with other users and developers in the community.