Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.comfy.org/llms.txt

Use this file to discover all available pages before exploring further.

Make sure your ComfyUI is updated.Workflows in this guide can be found in the Workflow Templates. If you can’t find them in the template, your ComfyUI may be outdated. (Desktop version’s update will delay sometime)If nodes are missing when loading a workflow, possible reasons:
  1. You are not using the latest ComfyUI version (Nightly version)
  2. Some nodes failed to import at startup
BiRefNet (Bilateral Reference Network) is a high-quality image background removal model. It produces clean, detailed masks for a wide range of subjects, including people, products, animals, and complex objects with fine details like hair or fur. BiRefNet is natively supported in ComfyUI (PR #12747). The model weights are available under the MIT License. BiRefNet on Hugging Face | Comfy-Org Model Repository | Paper (arXiv)

Key strengths

  • High-quality masks — accurate edge detection for hair, fur, and fine details
  • Versatile subject detection — works well on people, products, animals, and complex scenes
  • Simple one-click workflow — just load an image and the model handles the rest
  • RGBA output — produces an image with transparent background ready for compositing
Limitations: Extremely cluttered backgrounds or subjects that blend into the background may produce less accurate masks. The model processes a single image at a time.

BiRefNet Background Removal Workflow

1. Download Workflow

Update your ComfyUI to the latest version, then go to Workflow -> Browse Templates and find “BiRefNet: Remove Background” under the Utility category.

Download JSON Workflow File

Download workflow

Run on Comfy Cloud

Open in cloud

2. Download Models

The BiRefNet model is hosted on the Comfy-Org BiRefNet model repository. Place it in the following directory structure:
📂 ComfyUI/
└── 📂 models/
    └── 📂 background_removal/
        └── birefnet.safetensors

3. Using the Workflow

  • Image — Load an image via the Load Image node (place it in the ComfyUI input/ folder)
  • The Remove Background (BiRefNet) subgraph processes the image and outputs:
    • IMAGE — the result with a transparent background (RGBA)
    • mask — the extracted foreground mask
Outputs can be previewed and used as inputs to other nodes for compositing, further editing, or saving.

Learn about Subgraph

This workflow uses Subgraph nodes for modular processing. Check out the Subgraph documentation to learn how to customize and extend the workflow.

Additional Notes

  • Model directory — the model must be placed in ComfyUI/models/background_removal/, not the checkpoints folder
  • Update required — BiRefNet support is available in recent ComfyUI versions. Make sure your ComfyUI is up to date.
  • RGBA output — the transparent background result can be directly composited onto new backgrounds or used in downstream workflows