# BiRefNet by Peng Zheng: Open-Weight Model
Source: https://savrn.com/models/birefnet
Markdown alternate of the page above; the site index is https://savrn.com/llms.txt

---

## Runs On

What it takes to serve BiRefNet (221M parameters): the memory its weights need at each precision, and the cheapest way to rent enough data-center GPUs to hold them.

| Precision | Weights | Memory needed | Cheapest setup | Per hour | Also fits |
| --- | --- | --- | --- | --- | --- |
| 16-bit | 0.4 GB | 0.5 GB | 1x [MI300X](https://savrn.com/ai-index/pricing/gpus/mi300x) (192 GB) Vultr | $1.85 | [1x H100](https://savrn.com/ai-index/pricing/gpus/h100) $1.99 · [1x MI325X](https://savrn.com/ai-index/pricing/gpus/mi325x) $2.00 |
| 8-bit | 0.2 GB | 0.3 GB | 1x [MI300X](https://savrn.com/ai-index/pricing/gpus/mi300x) (192 GB) Vultr | $1.85 | [1x H100](https://savrn.com/ai-index/pricing/gpus/h100) $1.99 · [1x MI325X](https://savrn.com/ai-index/pricing/gpus/mi325x) $2.00 |
| 4-bit | 0.1 GB | 0.1 GB | 1x [MI300X](https://savrn.com/ai-index/pricing/gpus/mi300x) (192 GB) Vultr | $1.85 | [1x H100](https://savrn.com/ai-index/pricing/gpus/h100) $1.99 · [1x MI325X](https://savrn.com/ai-index/pricing/gpus/mi325x) $2.00 |

Memory is the weights at that precision plus 20% for the runtime and a short context; a long context needs more. Prices are the lowest on-demand hourly rates in the [SAVRN Index](https://savrn.com/ai-index/pricing/gpus), read Oct 23, 2026.

[BiRefNet on every accelerator the SAVRN Index prices, at every precision](https://savrn.com/models/birefnet/gpus)

## SAVRN's Notes on BiRefNet

Cutting a subject cleanly out of a high-resolution image is the job here, and at 221 million parameters it is among the smallest things we would put on a GPU. The 16-bit weights are 0.4 GB and need about 0.5 GB of memory; the 4-bit build runs in 0.1 GB. The cheapest Index listing is one MI300X with 192 GB at $1.85 an hour, far more card than this needs. It belongs as one tenant on hardware already doing other work.

MIT is as short as licenses get: commercial use, modification and redistribution are allowed as long as the copyright and permission notices travel with the files. Access is open. Before committing, confirm the 444 MB safetensors download matches the arXiv:2401.03407 version you tested, since the repository was updated on February 4, 2026, and plan cost as GPU hours, because a segmentation model has no per-token price.

SAVRN Research, 2026-09-18

## Model Card

By Peng Zheng, published under mit, revision e2bf8e4460fc.

### Bilateral Reference for High-Resolution Dichotomous Image Segmentation

[Peng Zheng](https://scholar.google.com/citations?user=TZRzWOsAAAAJ) 1,4,5,6, [Dehong Gao](https://scholar.google.com/citations?user=0uPb8MMAAAAJ) 2, [Deng-Ping Fan](https://scholar.google.com/citations?user=kakwJ5QAAAAJ) 1*, [Li Liu](https://scholar.google.com/citations?user=9cMQrVsAAAAJ) 3, [Jorma Laaksonen](https://scholar.google.com/citations?user=qQP6WXIAAAAJ) 4, [Wanli Ouyang](https://scholar.google.com/citations?user=pw_0Z_UAAAAJ) 5, [Nicu Sebe](https://scholar.google.com/citations?user=stFCYOAAAAAJ) 6

1 Nankai University 2 Northwestern Polytechnical University 3 National University of Defense Technology 4 Aalto University 5 Shanghai AI Laboratory 6 University of Trento

| DIS-Sample_1 | DIS-Sample_2 |
| --- | --- |

This repo is the official implementation of "[Bilateral Reference for High-Resolution Dichotomous Image Segmentation](https://savrn.com/papers/bilateral-reference-for-high-resolution-dichotomous-image-segmentation)" (CAAI AIR 2024).

Visit our GitHub repo: [https://github.com/ZhengPeng7/BiRefNet](https://github.com/ZhengPeng7/BiRefNet) for more details -- codes, docs, and model zoo!

### How to use

#### 0. Install Packages:

```
pip install -qr https://raw.githubusercontent.com/ZhengPeng7/BiRefNet/main/requirements.txt
```

#### 1. Load BiRefNet:

##### Use codes + weights from HuggingFace

Only use the weights on HuggingFace -- Pro: No need to download BiRefNet codes manually; Con: Codes on HuggingFace might not be latest version (I'll try to keep them always latest).

[Read the full model card (687 words)](https://savrn.com/models/birefnet/card)

## Configuration

Architecture

BiRefNet

## Identity and Version

Repository

ZhengPeng7/BiRefNet

Publisher

Peng Zheng

Task

Image segmentation

Modality

Image

Library

birefnet

Parameters

221M parameters

Languages

Not stated by the source

Revision

e2bf8e4460fc8fa32bba5ea4d94b3233d367b0e4

First published

2024-07-12

Last updated

2026-02-04

## Files and Weights

9 files, 444.6 MB in total. The weights are 1 file totalling 444.5 MB in safetensors.

Weights1 file · 444.5 MB

Configuration4 files · 97.4 KB

Documentation1 file · 10.0 KB

Other1 file · 149 B

Repository2 files · 3.4 KB

Every file

| File | Type | Size | SHA-256 |
| --- | --- | --- | --- |
| model.safetensors | Weights | 444.5 MB | 9ab37426bf4d |
| BiRefNet_config.py | Configuration | 298 B | — |
| birefnet.py | Configuration | 91.9 KB | — |
| config.json | Configuration | 405 B | — |
| handler.py | Configuration | 4.8 KB | — |
| README.md | Documentation | 10.0 KB | — |
| requirements.txt | Other | 149 B | — |
| .gitattributes | Repository | 1.5 KB | — |
| .gitignore | Repository | 1.9 KB | — |

## License and Download

License

mit

Access

Open weights, no gate

Download size

444.5 MB

[Download from Peng Zheng](https://huggingface.co/ZhengPeng7/BiRefNet)

Released by Peng Zheng through its official repository on Hugging Face. [Read the license](https://opensource.org/license/mit).

## Built From

- Described by [arXiv:2401.03407](https://savrn.com/papers/bilateral-reference-for-high-resolution-dichotomous-image-segmentation)

## Memory Requirements

| Precision | Weights in memory |
| --- | --- |
| As published | 444.5 MB |
| 16-bit | 0.4 GB |
| 8-bit | 0.2 GB |
| 4-bit | 0.1 GB |

Weights only, from the published parameter count; the key-value cache and runtime add to this.

## Questions About BiRefNet

### How much GPU memory does BiRefNet need?

About 0.5 GB at 16-bit and 0.1 GB at 4-bit: the weights (221M parameters) plus a working margin. A long context needs more.

### What is the cheapest GPU to run BiRefNet on?

At 16-bit, 1x MI300X from $1.85 an hour; at 4-bit, 1x MI300X from $1.85 an hour, at the lowest on-demand prices the SAVRN Index lists.

### Can I use BiRefNet commercially?

Yes. BiRefNet is released under MIT License. The MIT License is a short permissive license. It permits commercial use, modification and redistribution, provided the copyright notice and permission notice are included.

## Similar Models

Model · Image segmentation

### [RMBG-2.0](https://savrn.com/models/rmbg-2-0)

[BRIA AI](https://savrn.com/model-publishers/briaai)

href="https://huggingface.co/briaai/FIBO" target="blank" rel="noopener" aria-label="Explore FIBO on Hugging Face" style=" src="https://huggingface.co/front/assets/huggingfacelogo-noborder.svg" alt="Hugging Face" width="18" height="18" style="display:block" RMBG v2.0 is our new state-of-the-art background removal model significantly improves RMBG v1.4. The model is designed to effectively separate foreground from background in a range of categories and image types. This model has been trained on a carefully selected dataset, which includes: general stock images, e-commerce, gaming, and advertising content, making it suitable for commercial use cases powering enterprise content creation at…

Access requested at publisher other 221M parameters transformers

[View model](https://savrn.com/models/rmbg-2-0)

Model · Image segmentation

### [BiRefNet_HR](https://savrn.com/models/birefnet-hr)

[Peng Zheng](https://savrn.com/model-publishers/zhengpeng7)

This repo is the official implementation of "Bilateral Reference for High-Resolution Dichotomous Image Segmentation" (CAAI AIR 2024). Visit our GitHub repo: https://github.com/ZhengPeng7/BiRefNet for more details -- codes, docs, and model zoo! This repo contains the weights of BiRefNet proposed in our paper, which has achieved the SOTA performance on three tasks (DIS, HRSOD, and COD). Go to my GitHub page for BiRefNet codes and the latest updates: https://github.com/ZhengPeng7/BiRefNet:) + Online Image Inference on Colab: + Online Inference with GUI on Hugging Face with adjustable resolutions: + Inference and evaluation of your given weights: + Many thanks to @freepik for their generous…

Open weights mit 221M parameters birefnet

[View model](https://savrn.com/models/birefnet-hr)

Model · Image segmentation

### [BiRefNet_HR-matting](https://savrn.com/models/birefnet-hr-matting)

[Peng Zheng](https://savrn.com/model-publishers/zhengpeng7)

This repo is the official implementation of "Bilateral Reference for High-Resolution Dichotomous Image Segmentation" (CAAI AIR 2024). Visit our GitHub repo: https://github.com/ZhengPeng7/BiRefNet for more details -- codes, docs, and model zoo! This repo contains the weights of BiRefNet proposed in our paper, which has achieved the SOTA performance on three tasks (DIS, HRSOD, and COD). Go to my GitHub page for BiRefNet codes and the latest updates: https://github.com/ZhengPeng7/BiRefNet:) + Online Image Inference on Colab: + Online Inference with GUI on Hugging Face with adjustable resolutions: + Inference and evaluation of your given weights: + Many thanks to @freepik for their generous…

Open weights mit 221M parameters birefnet

[View model](https://savrn.com/models/birefnet-hr-matting)

Model · Image segmentation

### [BiRefNet-portrait](https://savrn.com/models/birefnet-portrait)

[Peng Zheng](https://savrn.com/model-publishers/zhengpeng7)

Check the main BiRefNet model repo for more info and how to use it: https://huggingface.co/ZhengPeng7/BiRefNet/blob/main/README.md Also check the GitHub repo of BiRefNet for all things you may want: https://github.com/ZhengPeng7/BiRefNet + Many thanks to @fal for their generous support on GPU resources for training this BiRefNet for portrait matting.

Open weights mit 221M parameters birefnet

[View model](https://savrn.com/models/birefnet-portrait)

Model · Image segmentation

### [BiRefNet_dynamic](https://savrn.com/models/birefnet-dynamic)

[Peng Zheng](https://savrn.com/model-publishers/zhengpeng7)

For performance of different epochs, check the evalresults-xxx folder for it on my google drive. This repo is the official implementation of "Bilateral Reference for High-Resolution Dichotomous Image Segmentation" (CAAI AIR 2024). Visit our GitHub repo: https://github.com/ZhengPeng7/BiRefNet for more details -- codes, docs, and model zoo! This repo contains the weights of BiRefNet proposed in our paper, which has achieved the SOTA performance on three tasks (DIS, HRSOD, and COD). Go to my GitHub page for BiRefNet codes and the latest updates: https://github.com/ZhengPeng7/BiRefNet:) + Online Image Inference on Colab: + Online Inference with GUI on Hugging Face with adjustable resolutions: +…

Open weights mit 221M parameters birefnet

[View model](https://savrn.com/models/birefnet-dynamic)

Model · Image segmentation

### [BiRefNet-matting](https://savrn.com/models/birefnet-matting)

[Peng Zheng](https://savrn.com/model-publishers/zhengpeng7)

Check the main BiRefNet model repo for more info and how to use it: https://huggingface.co/ZhengPeng7/BiRefNet/blob/main/README.md Also check the GitHub repo of BiRefNet for all things you may want: https://github.com/ZhengPeng7/BiRefNet + Many thanks to @freepik for their generous support on GPU resources for training this model!

Open weights mit 221M parameters birefnet

[View model](https://savrn.com/models/birefnet-matting)

## Peng Zheng

[All models and datasets](https://savrn.com/model-publishers/zhengpeng7)

## Versions

- [e2bf8e4460fc](https://savrn.com/models/birefnet/versions/e2bf8e4460fc) · current 2026-09-18

## Explore More

- [All image segmentation models](https://savrn.com/models/tasks/image-segmentation)
- [All models under mit](https://savrn.com/models/licenses/mit)
- [Model comparisons](https://savrn.com/models/comparisons)
- [The model directory](https://savrn.com/models)
- [Open model prices by host](https://savrn.com/ai-index/pricing/open-models)

## Source

- Repository metadata, read 2026-10-19.
- [Hugging Face record](https://huggingface.co/ZhengPeng7/BiRefNet)
- [How the hub is built](https://savrn.com/model-hub/methodology)
