ComfyUI  >  Nodes  >  ComfyUI-BiRefNet >  BiRefNet Segmentation

ComfyUI Node: BiRefNet Segmentation

Class Name


viperyl (Account age: 2031 days)
Latest Updated
Github Stars

How to Install ComfyUI-BiRefNet

Install this extension via the ComfyUI Manager by searching for  ComfyUI-BiRefNet
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-BiRefNet 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

  • Free trial available
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

BiRefNet Segmentation Description

Sophisticated image segmentation node enhancing segmentation quality with deep learning for precise image compositions.

BiRefNet Segmentation:

BiRefNet is a sophisticated node designed for image segmentation tasks, particularly focusing on refining and enhancing the segmentation quality of images. It leverages a deep learning model to process images and generate high-quality segmentation maps, which can be particularly useful for AI artists looking to create precise and detailed image compositions. The node is built to handle various image sizes and formats, ensuring flexibility and ease of use. By utilizing advanced neural network architectures, BiRefNet aims to deliver accurate and reliable segmentation results, making it an essential tool for tasks that require meticulous image analysis and manipulation.

BiRefNet Segmentation Input Parameters:


The image parameter is the primary input for the BiRefNet node. It accepts an image in the form of a NumPy array, which will be processed and segmented by the model. The quality and resolution of the input image can significantly impact the segmentation results. Ensure that the image is clear and well-defined to achieve the best outcomes. There are no specific minimum or maximum values for this parameter, but higher resolution images may provide more detailed segmentation.


The device parameter specifies the computational device to be used for processing the image. It can take values such as cpu, cuda, or mps, depending on the available hardware. The default value is auto, which allows the node to automatically select the best available device. Using a GPU (cuda or mps) can significantly speed up the processing time, especially for high-resolution images or large batches.

BiRefNet Segmentation Output Parameters:


The segmentation_map is the output parameter of the BiRefNet node. It provides the segmented version of the input image, highlighting different regions or objects within the image. The output is typically a NumPy array with the same dimensions as the input image, where each pixel value represents the likelihood of belonging to a particular segment. This output is crucial for tasks that require precise delineation of objects or regions within an image, enabling further manipulation or analysis.

BiRefNet Segmentation Usage Tips:

  • Ensure that your input images are of high quality and resolution to achieve the best segmentation results.
  • Utilize a GPU (cuda or mps) if available, as it can significantly reduce the processing time compared to using a CPU.
  • Experiment with different image sizes and formats to find the optimal configuration for your specific use case.

BiRefNet Segmentation Common Errors and Solutions:

Failed to load the model: <error_message>

  • Explanation: This error occurs when the model weights cannot be loaded, possibly due to an incorrect file path or incompatible device.
  • Solution: Verify that the weight file path is correct and that the specified device is available and compatible. Ensure that the weight file is not corrupted.

Model loading failed: <error_message>

  • Explanation: This error indicates a failure during the model loading process, which could be due to various reasons such as missing dependencies or incorrect configurations.
  • Solution: Check the log for detailed error messages, ensure all dependencies are installed, and verify the configuration settings. Reinstalling the required packages or updating the configuration file may resolve the issue.

Device not supported: <device_name>

  • Explanation: This error occurs when the specified device is not supported or available on the system.
  • Solution: Ensure that the device name is correctly specified and that the necessary hardware and drivers are installed. If the device is not available, switch to a supported device such as cpu or cuda.

BiRefNet Segmentation Related Nodes

Go back to the extension to check out more related nodes.

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.