Image Segmentation
Diffusers
Safetensors
English
BriaFibo2Pipeline
background-removal
remove-background
alpha-matting
image-matting
segmentation
distillation
fibo
rmbg
Instructions to use ml-resources/RMBG-3.0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use ml-resources/RMBG-3.0 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("ml-resources/RMBG-3.0", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
File size: 16,907 Bytes
e7c78ea | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 | ---
license: other
license_name: bria-fibo
license_link: https://creativecommons.org/licenses/by-nc/4.0/deed.en
language:
- en
library_name: diffusers
pipeline_tag: image-segmentation
base_model: briaai/Fibo-2.0-dev
tags:
- background-removal
- remove-background
- alpha-matting
- image-matting
- segmentation
- distillation
- fibo
- rmbg
---
> Mirror of [briaai/RMBG-3.0](https://huggingface.co/briaai/RMBG-3.0) by BRIA AI. All credit to the original authors. Not an official release from them. **Non-commercial use only**: licensed under CC BY-NC 4.0 (`bria-fibo`), see `LICENSE`. Weights and other files are unmodified; this README only adds this note and removes the access-request form fields.
<p align="center">
<img src="https://bria-public.s3.us-east-1.amazonaws.com/Bria-logo.svg" width="200"/>
</p>
<p align="center">
<a href="https://fal.ai/models/bria/rmbg-3"><img src="https://img.shields.io/badge/fal.ai-Try%20RMBG--3.0-23123F?style=for-the-badge"/></a>
<a href="https://platform.bria.ai/image-editing/remove-background/sandbox"><img src="https://img.shields.io/badge/Bria-API%20Sandbox-6F6E98?style=for-the-badge"/></a>
<a href="https://create.bria.ai/"><img src="https://img.shields.io/badge/Bria-Create-55526E?style=for-the-badge"/></a>
</p>
# BRIA Background Removal v3.0 Model Card
π **#1 in background removal** in our head-to-head benchmark against Photoroom, remove.bg (Canva), Ideogram, BiRefNet and RMBG-2.0, on 234 hard images at full resolution.
**Background removal, reimagined as image editing. In 4 steps.**
RMBG 3.0 is the third generation of Bria's background removal models, and the first one built on a generative foundation. It is [Fibo 2.0](https://huggingface.co/briaai/Fibo-2.0-dev), fine-tuned and distilled to do one thing very well: turn any photo into a clean, soft **alpha matte** in just **4 steps**.
Because it starts from a model that *understands* images, not just edges, RMBG 3.0 knows what the subject is. It keeps every person in a group shot, keeps motion-blurred limbs, clears the holes in chain-link and bicycle spokes, and knows that a cast shadow is not part of the product. Like every FIBO model, it is **trained exclusively on licensed data**.
| | |
|---|---|
| π₯ **#1 of 6 vendors and models** | Average rank **1.51** across 234 hard images, best or tied-best on **185** of them (79%). |
| βοΈ **Wins every head to head** | Preferred **55.1%** vs Photoroom, **59.4%** vs remove.bg (Canva), **60.9%** vs RMBG-2.0, **65.6%** vs Ideogram and **75.9%** vs BiRefNet. |
| π― **Leads 7 of 12 hard categories, top 2 in 10** | #1 on motion blur, multiple subjects, holes & mesh, shadows & reflections, hair & fur, transparent objects and reflective surfaces. |
| ποΈ **Built for e-commerce** | #1 on 48 real online-store product shots (avg. rank **1.15** vs Photoroom's 1.83 and remove.bg's 1.94). Product text, logos and badges stay intact. |
| β‘ **4-step distilled** | No classifier-free guidance, about 6 s per image on a single L40S. |
| π‘οΈ **100% licensed data** | Like every FIBO model: governance, attribution and legal clarity for commercial use. |
---
## πΌοΈ Examples
<p align="center">
<img src="https://d1uqrfwi55x6ib.cloudfront.net/rmbg-3.0-dev/assets/rmbg3_examples_v3.jpg" width="100%"/>
</p>
<p align="center"><sub><b>Top:</b> input Β· <b>Middle:</b> predicted alpha matte Β· <b>Bottom:</b> cut-out using the matte as alpha.</sub></p>
Spokes, chain-link, a bird on a branch, a sailboat on choppy water, a silhouette with its cast shadow left behind, and a splash frozen mid-air: the matte stays faithful to the subject and drops everything that isn't.
<sub>Second image: "Sears Plaque on Chain Link Fence" by Phillip Pessar,
[CC BY 2.0](https://creativecommons.org/licenses/by/2.0/). Fourth image: yacht on the Swan River
off Claremont Yacht Club, Perth, by aussiejeff,
[CC BY-SA 2.0](https://creativecommons.org/licenses/by-sa/2.0/); its matte and cut-out are shared
under the same licence. Other inputs are CC0 or public domain.</sub>
### More examples
<p align="center"><b>Bouquet held against a dense garden:</b> every stem, fern leaf and baby's-breath floret is kept, and the hand stays attached.</p>
<p align="center"><img src="https://d1uqrfwi55x6ib.cloudfront.net/rmbg-3.0-dev/assets/rmbg3_example_flowers.jpg" width="100%"/></p>
<p align="center"><b>Puppy on a patterned kitchen floor:</b> soft fur edges, with the busy tiles and cabinets cleanly removed.</p>
<p align="center"><img src="https://d1uqrfwi55x6ib.cloudfront.net/rmbg-3.0-dev/assets/rmbg3_example_dog.jpg" width="100%"/></p>
<p align="center"><b>Open-knit cardigan on a busy street:</b> the background shows through every hole in the knit, while the satin dress stays solid.</p>
<p align="center"><img src="https://d1uqrfwi55x6ib.cloudfront.net/rmbg-3.0-dev/assets/rmbg3_example_beige_sweater.jpg" width="100%"/></p>
<p align="center"><sub><b>Left:</b> input, generated with FIBO Β· <b>Right:</b> RMBG-3.0 cut-out on a checkerboard.</sub></p>
---
## π Evaluation
We compared RMBG-3.0 with **Photoroom**, **remove.bg (Canva)**, **Ideogram** (via fal), **BiRefNet** (via fal) and our previous model **RMBG-2.0** on **234 deliberately hard images**: hair and fur, glass, mesh, clutter, motion blur, product shots, illustrations, and 20 real customer images that were chosen *because* they are hard to cut out. Every system ran on the original full-resolution images at its default settings, with one output per image. Results combine blind voting by professional and casual users with a VLM side-by-side comparison. Every image was ranked 1β6 (1 = best), with ties allowed; a system that returned no output was ranked last. RMBG-3.0, RMBG-2.0 and BiRefNet are open source, with weights on Hugging Face (RMBG-3.0 for non-commercial use).
<p align="center">
<img src="https://d1uqrfwi55x6ib.cloudfront.net/rmbg-3.0-dev/assets/rmbg3_rank_v3.png" width="100%"/>
</p>
<p align="center">
<img src="https://d1uqrfwi55x6ib.cloudfront.net/rmbg-3.0-dev/assets/rmbg3_h2h_v3.png" width="100%"/>
</p>
<p align="center">
<img src="https://d1uqrfwi55x6ib.cloudfront.net/rmbg-3.0-dev/assets/rmbg3_categories_v3.png" width="100%"/>
</p>
<details>
<summary><b>Full numbers</b></summary>
**Overall ranking**
| # | Model | Avg. rank β | Best or tied-best |
|---|---|:---:|:---:|
| 1 | **RMBG-3.0** (Bria) Β· π€ open source | **1.51** | **185 / 234** |
| 2 | Photoroom | 1.87 | 162 / 234 |
| 3 | RMBG-2.0 (Bria) Β· π€ open source | 2.16 | 140 / 234 |
| 4 | remove.bg (Canva) | 2.22 | 151 / 234 |
| 5 | Ideogram (via fal) | 2.76 | 113 / 234 |
| 6 | BiRefNet (via fal) Β· π€ open source | 3.56 | 78 / 234 |
**Head to head** (per-image preference, ties count as half a win)
| RMBG-3.0 vs | Preference | Wins | Ties | Losses |
|---|:---:|:---:|:---:|:---:|
| Photoroom | **55.1%** | 63 | 132 | 39 |
| remove.bg (Canva) | **59.4%** | 65 | 148 | 21 |
| RMBG-2.0 Β· π€ open source | **60.9%** | 76 | 133 | 25 |
| Ideogram | **65.6%** | 102 | 103 | 29 |
| BiRefNet Β· π€ open source | **75.9%** | 137 | 81 | 16 |
**12 hard categories** (average rank, lower is better; best in bold)
| Category | RMBG-3.0 | Photoroom | RMBG-2.0 | remove.bg | Ideogram | BiRefNet |
|---|:---:|:---:|:---:|:---:|:---:|:---:|
| Motion blur & depth of field | **1.00** | 2.11 | 1.56 | 3.44 | 2.67 | 2.33 |
| Multiple subjects | **1.20** | 2.90 | 1.90 | 2.80 | 2.30 | 2.40 |
| Holes & mesh | **1.22** | 1.89 | 3.33 | 3.44 | 2.78 | 4.11 |
| Shadows & reflections | **1.57** | 2.29 | 2.43 | 2.57 | 4.00 | 2.00 |
| Hair & fur | **1.60** | 1.70 | 2.50 | 3.10 | 2.50 | 2.80 |
| Transparent objects\* | **1.70** | 1.80 | 3.50 | 2.90 | 2.60 | 3.80 |
| Reflective surfaces | **1.30** | 2.50 | 1.40 | 1.50 | 2.80 | 4.40 |
| Thin structures | 2.10 | **1.80** | 2.40 | 3.80 | 4.30 | 3.20 |
| Smoke, fire & splashes | 2.10 | **1.80** | 2.20 | 3.30 | 3.60 | 2.90 |
| Cluttered backgrounds | 2.70 | 2.80 | 3.20 | **1.90** | 3.10 | 4.80 |
| Low contrast (camouflage, white on white) | 2.30 | 1.70 | **1.50** | 2.20 | 3.00 | 3.40 |
| Semi-transparent (veils, tulle, smoke) | 2.67 | **1.89** | 2.71 | 2.00 | 2.78 | 2.89 |
\*RMBG-3.0 ranks highest on average, but Photoroom wins 55% of the transparent images head to head, because it renders glass as see-through. Each hard category has 7β10 images, so one image moves a row by about 0.1β0.5.
</details>
---
## β¨ Why it wins
| | |
|---|---|
| π₯ **Keeps the whole subject** | Gets every person in group shots and keeps motion-blurred limbs. It knows that a cast shadow or a reflection is not the product. |
| πΈοΈ **Clears the holes** | Gaps in chain-link, cages, bicycle spokes, chair rungs and openwork come out clean, where older models fill them in. |
| π¦ **Solid products stay solid** | No grey, half-transparent patches or punched-out holes inside packaging, white products or dark lids. |
| π·οΈ **Text and logos stay intact** | Labels, badges and printed text on products survive the cut-out, ready for catalogs. |
| π«οΈ **Soft, natural edges** | A true 8-bit alpha matte with anti-aliased edges, not a hard binary mask. Threshold it, or use it as-is. |
---
## β‘ Quick Start
| | |
|---|---|
| π **Try it now** |[Bria API sandbox](https://platform.bria.ai/image-editing/remove-background/sandbox) Β· [Bria Create](https://create.bria.ai/) Β· [fal.ai Β· bria/rmbg-3](https://fal.ai/models/bria/rmbg-3)|
| π **Bria API** | [docs.bria.ai](https://docs.bria.ai/image-editing/v2-endpoints/background-remove) |
| π§© **ComfyUI** | [Bria ComfyUI nodes](https://github.com/Bria-AI/ComfyUI-BRIA-API) |
| π€ **Agents** | [Bria agent skill](https://github.com/Bria-AI/bria-skill) |
### Bria API
Commercially licensed, fully managed, no GPU required:
```bash
curl -X POST "https://engine.prod.bria-api.com/v2/image/edit/remove_background" \
-H "api_token: $BRIA_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"image": "https://d1uqrfwi55x6ib.cloudfront.net/rmbg-3.0-dev/assets/rmbg3_example_input_dog.jpg", "model": "RMBG3"}'
```
### Run the open weights with 𧨠Diffusers
```bash
pip install -U "diffusers>=0.42.0" torch torchvision transformers accelerate
```
This repo holds only the fine-tuned transformer. The rest of the pipeline (text encoder, VAE, fonts) comes from
[Fibo 2.0 Edit Turbo](https://huggingface.co/briaai/Fibo-2.0-edit-turbo), so accept its access form first.
```python
import json
import torch
from diffusers import AutoModel, BriaFibo2Pipeline
from huggingface_hub import hf_hub_download
from PIL import Image
BASE = "briaai/Fibo-2.0-edit-turbo"
# The fixed instruction. Use exactly this text for every image.
INSTRUCTION = (
"Generate a detailed grayscale alpha matte. Map the opaque foreground to white and the "
"background to black. Produce soft, anti-aliased grayscale gradients at the edges of the "
"subject to represent fine details and transparency."
)
PROMPT = json.dumps({"edit_instruction": INSTRUCTION})
transformer = AutoModel.from_pretrained(
"briaai/RMBG-3.0", subfolder="transformer", dtype=torch.bfloat16
)
pipe = BriaFibo2Pipeline.from_pretrained(
BASE, transformer=transformer, dtype=torch.bfloat16
).to("cuda")
fonts = [hf_hub_download(BASE, n, subfolder="fonts") for n in ("Aileron-Regular.otf", "DejaVuSans.ttf")]
source = Image.open("photo.jpg").convert("RGB")
result = pipe(
prompt=PROMPT,
image=source,
num_inference_steps=4,
guidance_scale=1.0,
generator=torch.Generator("cuda").manual_seed(0),
fonts=fonts,
).images[0]
matte = result.convert("L").resize(source.size, Image.LANCZOS) # white = keep
cutout = source.copy()
cutout.putalpha(matte)
cutout.save("photo_cutout.png")
```
| Setting | Value | Why |
| --- | --- | --- |
| `num_inference_steps` | 4 | The model was distilled to finish in 4 steps. |
| `guidance_scale` | 1.0 | No classifier-free guidance, as in Fibo 2.0 Edit Turbo. |
| Prompt | the fixed instruction | The model was trained on this exact text and nothing else. A changed or missing instruction gives a coloured picture instead of a matte. |
| GPU memory | 32 GB or more | Measured peak 28.5 GiB on one L40S, with the whole pipeline in bf16. |
| Speed | about 6 s per image | Measured on one L40S at about 1 megapixel, including text encoding and decoding. |
> π‘ **Output format.** The model returns a single-channel 8-bit matte: white is the subject, black is the background, and grey marks partial transparency at hair, fur, glass and motion blur. Use it directly as the alpha channel, or threshold it if you need a binary mask.
---
## π§ How it works
Classic background-removal models, including [RMBG-2.0](https://huggingface.co/briaai/RMBG-2.0), are segmentation networks that learn edges from labelled masks. RMBG 3.0 takes a different route: it treats background removal as an **image edit**. The input photo goes in as the context image, a fixed instruction asks for an alpha matte, and the model *renders* the matte.
- **Foundation:** [Fibo 2.0](https://huggingface.co/briaai/Fibo-2.0-dev), an 8B-parameter flow-matching DiT with a Qwen3-VL-4B prompt and image encoder, operating in the FLUX.2 VAE latent space.
- **Fine-tuning:** trained for alpha matting on licensed data, starting from Fibo 2.0's editing weights.
- **Distillation:** distilled to **4 steps** without classifier-free guidance, for production speed.
Starting from a generative model gives RMBG 3.0 a semantic understanding of the scene: what the subject is, where it ends, and what merely belongs to its surroundings (shadows, reflections, props).
### RMBG 3.0 or RMBG 2.0?
| | **RMBG 3.0** | [RMBG 2.0](https://huggingface.co/briaai/RMBG-2.0) |
|---|---|---|
| Approach | Generative, editing-based (Fibo 2.0) | Segmentation (BiRefNet) |
| Parameters | 8B | 0.2B |
| Quality on hard images | π₯ Best | Good |
| Speed | ~6 s / image (L40S) | Much faster, single forward pass |
| GPU memory | 32 GB+ | Fits on small GPUs |
| Best for | Hard images, product catalogs, quality-first workflows | High-volume, low-latency jobs and edge devices |
---
## β οΈ Limitations
We publish where RMBG 3.0 still loses so you can pick the right tool. We are actively working on all of them.
- **True transparency.** Glass, nets, veils, smoke and splashes tend to come out opaque, where Photoroom renders them see-through. This is the main reason Photoroom wins 39 of the 234 images.
- **Busy and low-contrast scenes.** RMBG 3.0 sometimes pulls in grass, props or a watermark next to the subject. remove.bg (Canva) leads on cluttered backgrounds, and RMBG-2.0 on white-on-white and camouflage shots.
- **Thin structures.** Photoroom is slightly better on very fine structures such as insect wings and spokes.
- **Rare broken outputs.** RMBG 3.0 ranked last on 5 of the 234 benchmark images (an empty matte, two that dropped the main object, one that pulled in props, one with a grey blotch in an insect wing).
- **Compute.** At 8B parameters it needs a large GPU. For lightweight deployment, use the [Bria API](https://platform.bria.ai/image-editing/remove-background/sandbox) or RMBG-2.0.
---
## π License
Weights are released under
[Creative Commons Attribution-NonCommercial 4.0 International](https://creativecommons.org/licenses/by-nc/4.0/deed.en)
(CC BY-NC 4.0), the same terms as the Fibo 2.0 family. The full text is in [LICENSE](https://huggingface.co/briaai/RMBG-3.0/blob/main/LICENSE).
**Commercial use** requires a separate agreement with Bria AI. Get a license [here](http://platform.bria.ai/licensing/pricing?model=rmbg-3.0), or use the commercially licensed [Bria API](https://docs.bria.ai/image-editing/v2-endpoints/background-remove) and [fal endpoint](https://fal.ai/models/bria/rmbg-3).
| | Self-hosted (HF weights) | Bria API / fal |
|---|---|---|
| Quality | β
RMBG 3.0 | β
RMBG 3.0 |
| Commercial license | β Requires agreement | β
Included |
| GPU infrastructure | β You manage (32 GB+) | β
Managed |
| Licensed training data | β
Yes | β
Yes |
---
## π¬ Community
Questions, feedback or ideas? Open a discussion in the [Community tab](https://huggingface.co/briaai/RMBG-3.0/discussions). Follow [Bria on Hugging Face](https://huggingface.co/briaai) for new releases. If you're passionate about fundamental research, we're hiring: see [bria.ai/careers](https://bria.ai/careers).
## Citation
RMBG 3.0 is built on the FIBO family. If you use it in your research, please cite:
```bibtex
@article{gutflaish2025generating,
title={Generating an Image From 1,000 Words: Enhancing Text-to-Image With Structured Captions},
author={Gutflaish, Eyal and Kachlon, Eliran and Zisman, Hezi and Hacham, Tal and Sarid, Nimrod and Visheratin, Alexander and Huberman, Saar and Davidi, Gal and Bukchin, Guy and Goldberg, Kfir and others},
journal={arXiv preprint arXiv:2511.06876},
year={2025}
}
```
|