> ## Documentation Index
> Fetch the complete documentation index at: https://dripart-feat-openapi-i18n.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# BiRefNet: Remove Image Background in ComfyUI

> Learn how to remove image backgrounds using the BiRefNet model, natively supported in ComfyUI

<Tip>
  <Tabs>
    <Tab title="Portable or self deployed users">
      Make sure your ComfyUI is updated.

      * [Download ComfyUI](https://www.comfy.org/download)
      * [Update Guide](/installation/update_comfyui)

      Workflows in this guide can be found in the [Workflow Templates](/interface/features/template).
      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
    </Tab>

    <Tab title="Desktop or Cloud users">
      * The Desktop is base on ComfyUI stable release, it will auto-update when there is a new Desktop stable release available.
      * [Cloud](https://cloud.comfy.org) will update after ComfyUI stable release.

      So, if you find any core node missing in this document, it might be because the new core nodes have not yet been released in the latest stable version. Please wait for the next stable release.
    </Tab>
  </Tabs>
</Tip>

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](https://github.com/Comfy-Org/ComfyUI/pull/12747)). The model weights are available under the [MIT License](https://github.com/ZhengPeng7/BiRefNet/blob/main/LICENSE).

[BiRefNet on Hugging Face](https://huggingface.co/ZhengPeng7/BiRefNet) | [Comfy-Org Model Repository](https://huggingface.co/Comfy-Org/BiRefNet) | [Paper (arXiv)](https://arxiv.org/abs/2401.00807)

### 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.

<Card title="Download JSON Workflow File" icon="download" href="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/refs/heads/main/templates/utility_birefnet_remove_background.json">
  Download workflow
</Card>

<Card title="Run on Comfy Cloud" icon="cloud" href="https://cloud.comfy.org/?template=utility_birefnet_remove_background&utm_source=docs">
  Open in cloud
</Card>

### 2. Download Models

The BiRefNet model is hosted on the [Comfy-Org BiRefNet model repository](https://huggingface.co/Comfy-Org/BiRefNet).

* [birefnet.safetensors](https://huggingface.co/Comfy-Org/BiRefNet/resolve/main/background_removal/birefnet.safetensors)

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.

<Card title="Learn about Subgraph" icon="book-open" href="/interface/features/subgraph">
  This workflow uses Subgraph nodes for modular processing. Check out the Subgraph documentation to learn how to customize and extend the workflow.
</Card>

## 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
