If you remove backgrounds with rembg, the free command-line tool and Python library behind countless scripts and batch jobs, check which model you are actually running. Since version 2.0.80 the default is BRIA's RMBG-2.0, released under a non-commercial licence, and on our 12 GB test machine it could not finish a single image before running out of memory. u2net, the old default, and ISNet are Apache-2.0 licensed and each ran in a third of a second or less, and ISNet with rembg's ViTMatte edge mode (-vm) cut our error score by 21% against plain u2net on the same photos.
Every number below comes from our own runs on 1 October 2026, on a CPU with no GPU. We scored rembg 2.0.85 against the 500 hand-labelled alpha mattes of AIM-500, a standard matting test set that is not in the documented training data of the models we scored, then tested the four edge modes on a fixed 150-image subset. Methods and scripts are listed at the end.
Quick Picks
- Pick ISNet with
-vmif you sell what you make and want the cleanest free cutout that runs on an ordinary computer.rembg i -m isnet-general-use -vm in.jpg out.pnghad the lowest error of every setup we could run, about 1.7 seconds per photo, and its model is Apache-2.0. - Pick u2net if you batch thousands of product shots or simple subjects and speed matters more than hair. It took 0.12 seconds per image, and on the typical image it tied ISNet.
- Pick the default (
bria-rmbg) only if your work is non-commercial or you have a signed agreement with BRIA, and your machine has well over 7 GB of free memory.
Skip -ppm (post-process mask) on anything with soft edges. It turns the matte into hard black and white, and it made the per-pixel error worse on 150 of 150 u2net images.

Detailed Comparison
rembg wraps more than a dozen segmentation models behind one command. We tested the five general-purpose ones: u2net (the default until August), ISNet (isnet-general-use), two BiRefNet checkpoints (birefnet-general and birefnet-general-lite), and BRIA's RMBG-2.0 (bria-rmbg), which BRIA describes as "developed on the BiRefNet architecture" with its own dataset and training. Only two of the five produced results on our machine.
Test 1: the default model and its licence
The switch came in pull request 845, shipped in rembg 2.0.80. It changed the default in every place one is declared: the rembg i, b and p commands, the HTTP server, the Gradio app, new_session(), and the fallback inside remove() when you pass no session. Code that calls remove(image) with nothing else now runs RMBG-2.0.
The pull request names the trade-off itself. RMBG-2.0 "requires a paid agreement for commercial use, unlike u2net", and making it the default means users who never pick a model get it anyway: "This is the main call to make on this PR." The RMBG-2.0 model page states the licence as CC BY-NC 4.0, with commercial use "subject to a commercial agreement with BRIA". The page links a request form for a self-hosted licence rather than a price, and points production users to BRIA's paid API.
Two details make this easy to miss. On Hugging Face, RMBG-2.0 sits behind an access gate where you accept the terms, but rembg downloads its own ONNX copy from rembg's GitHub releases, so you never see that gate. And nothing at runtime mentions the licence: the source of the -m option describes it only as "model name", with bria-rmbg as the default. The one warning is a sentence in the rembg README's model list.
Test 2: memory, what fits on a normal machine
All three BiRefNet-family models were killed by the operating system during their first prediction, on a 1,630 by 1,080 photo. Our container has 12 GB of RAM, of which about 6.9 GB was free; the process memory we sampled had reached 6,684 to 6,949 MB when it died. We retried the lite model with ONNX Runtime's memory arena off, memory patterns off, a single thread and graph optimisation disabled. It was killed every time. These models always run at 1,024 by 1,024 pixels, so a smaller photo does not help.
| Model (rembg name) | Download | Peak RAM, one photo | Time per image | Weights licence |
|---|---|---|---|---|
u2net | 176 MB | 2.1 GB | 0.12 s | Apache-2.0 |
isnet-general-use | 179 MB | 2.8 GB | 0.33 s | Apache-2.0 |
birefnet-general-lite | 224 MB | killed above 6.6 GB | did not finish | MIT |
birefnet-general | 973 MB | killed above 6.9 GB | did not finish | MIT |
bria-rmbg (default) | 1,024 MB | killed above 6.9 GB | did not finish | CC BY-NC 4.0 |
Peak RAM is the whole Python process, sampled every 50 milliseconds. Time is the median over 499 images on 6 virtual CPUs (AMD Ryzen 7 9700X). Code licences: U-2-Net and DIS, the ISNet project, are Apache-2.0; BiRefNet is MIT. If you have a GPU or a 16 GB machine with room to spare, BiRefNet will likely run; we simply could not score it here, and we do not quote anyone else's numbers in its place.
Test 3: u2net vs ISNet on 500 photos
AIM-500 covers seven kinds of subject, from animals and portraits to furniture and glass, each with a hand-drawn alpha matte where a hair or a wine glass is partly transparent rather than in or out. We scored each cutout four ways: SAD (total alpha error in thousands of pixels, the unit matting papers use, lower is better), the error in a band around the edges, where cutouts actually go wrong, overlap with the true subject (IoU), and outright failures, where the cutout overlaps the subject by less than half.
| All 500 AIM-500 photos | u2net | ISNet |
|---|---|---|
| Mean SAD (lower is better) | 70.7 | 65.8 |
| Median SAD | 24.5 | 25.1 |
| Error in the edge band | 15.9% | 12.8% |
| Mean overlap (IoU) | 0.859 | 0.876 |
| Clean cutouts (IoU 0.95 or better) | 281 | 300 |
| Failures (IoU under 0.5) | 45 | 36 |
| Photos where it had the lower error | 191 | 309 |
ISNet wins, but read the median row before switching everything. On the typical photo the two are level: half the images scored 24.5 or better with u2net and 25.1 or better with ISNet. ISNet's lead comes from the hard cases, where u2net's blockier edges cost the most. On the 43 images the dataset's authors label transparent or finely detailed, ISNet had the lower error on 35.

Test 4: where both fail, glass and busy scenes
| Category (photos) | u2net SAD | ISNet SAD | u2net failures | ISNet failures |
|---|---|---|---|---|
| Animal (200) | 57.9 | 59.8 | 6 | 7 |
| Portrait (100) | 60.1 | 58.5 | 3 | 5 |
| Plant (75) | 94.9 | 75.7 | 10 | 5 |
| Furniture (45) | 42.7 | 33.0 | 2 | 1 |
| Toy (36) | 43.0 | 47.2 | 0 | 1 |
| Transparent (34) | 203.4 | 175.8 | 24 | 17 |
| Fruit (10) | 26.3 | 23.5 | 0 | 0 |
Glass is where both fall apart: u2net failed 24 of 34 transparent objects and ISNet 17. The other weak spot is what AIM-500 calls non-salient scenes, where the subject does not stand out from its surroundings; u2net failed 23 of 33 and ISNet 16. Both models failed on the same 23 photos. If your catalogue is bottles and glassware, neither model will save you editing time, and a promptable matting model such as MultiMatte, which you steer by naming the object, is the thing to try next. It is a fine-tune of the 0.86-billion-parameter SAM 3, and its 3.4 GB weights file was larger than the disk space we had left, so we did not run it here.
Test 5: the four edge modes
rembg can treat the soft pixels along an edge four ways after the model produces its mask. We ran each on the same 150 photos, drawn at random with a fixed seed.
| 150 photos | u2net SAD | u2net edge error | ISNet SAD | ISNet edge error | Added time, median |
|---|---|---|---|---|---|
| Plain mask (no flag) | 80.3 | 16.7% | 72.4 | 14.2% | 0 s |
-ppm post-process mask | 81.3 | 17.4% | 73.7 | 15.8% | 0.03 s |
-dc decontaminate | 80.3 | 16.7% | 72.4 | 14.2% | 0.2 s |
-a alpha matting | 75.5 | 14.9% | 69.0 | 13.4% | 1.3 to 1.5 s |
-vm ViTMatte | 71.3 | 12.6% | 63.1 | 11.1% | 1.3 s |
-vm is the one to use. It sends the mask and photo through ViTMatte, a small matting network (an extra 114 MB download, MIT-licensed code), which re-estimates the soft band. It lowered u2net's edge error on 144 of 150 photos, lowered ISNet's on 116, and cut ISNet's error on glass from 213.8 to 180.5. Its time barely moves: 1.34 to 1.35 seconds in the median and under 1.5 seconds at the 90th percentile.
-a helps, less and less predictably. It solves for the edge with PyMatting's closed-form solver. Its median cost matched ViTMatte's, but its slow tail did not: 5 u2net photos and 11 ISNet photos took over 10 seconds each, the worst 40.5 seconds, and the solver failed outright on 2 photos per model, where rembg quietly falls back to the plain mask. It also used up to 2 GB of extra memory on a single photo. The rembg README says -vm "runs slower than -a"; on our CPU the medians tied and -a had the far worse worst case.
-dc does not change the shape at all. It recolours edge pixels to remove a halo from the old background, so its alpha, and our scores, are identical to the plain mask. We did not score colour; use it when you see a green or blue rim, as the README advises.
-ppm makes things worse on soft subjects. It blurs and then thresholds the mask, so every pixel becomes fully in or fully out: the share of soft pixels went to exactly 0%. The per-pixel squared error rose on 150 of 150 u2net photos and 147 of 150 ISNet photos. It is meant to smooth jagged outlines, and on hard-edged products it can, but it deletes hair and transparency by design.

When Each One Wins
u2net wins on volume. At 0.12 seconds an image it processed all 500 test photos in about a minute on six CPU cores, and on ordinary opaque subjects (a product on a table, a person against a wall) its median result matched ISNet's. Add -vm when people or pets are involved; portraits went from 13.97% edge error to 9.07%.
ISNet wins on difficult subjects: plants, furniture with thin legs, glass, anything where the outline is complicated. It is three times slower than u2net and still fast, and with -vm it produced the best numbers we measured: mean SAD 63.1 against 80.3 for plain u2net on the same 150 photos.
The default bria-rmbg may well produce cleaner cutouts than either; the rembg maintainers chose it for "noticeably cleaner edges". We could not verify that, because it would not run in the memory we had. If you have the hardware and your work is personal, academic or otherwise non-commercial, it is worth a test. For client work, merchandise, ads or a product you sell, treat it as off-limits until you have BRIA's agreement in writing.
For moving images the trade-offs change; our guide to removing a video background with AI covers the per-frame tools and keyers.
Cost, Licence and Hardware
All five models cost nothing to download, so the real costs are licence risk, memory and time. The cheapest safe setup and the default sit at opposite ends of all three.
| Setup | Downloads | Commercial use | Time per 1,000 photos (6 CPU cores) |
|---|---|---|---|
| u2net | 176 MB | Yes (Apache-2.0) | about 2 minutes |
u2net with -vm | 290 MB | Yes (Apache-2.0 model, MIT ViTMatte code) | about 25 minutes |
ISNet with -vm | 293 MB | Yes (Apache-2.0 model, MIT ViTMatte code) | about 28 minutes |
bria-rmbg (default) | 1,024 MB | Only with a BRIA agreement (CC BY-NC 4.0) | did not run in 6.9 GB |
Times are the medians from our runs multiplied out: model plus edge mode, excluding file reading and writing. ViTMatte's checkpoint was trained on the Distinctions-646 matting dataset; if your legal team audits training data as well as licences, add it to the list. To pin a model in a script, pass a session explicitly: new_session("isnet-general-use"), and hand it to remove(), so a future change of default cannot switch models under you.

Verdict
Add -m to every rembg command you run. For commercial work on an ordinary computer, -m isnet-general-use -vm is the best free setup we could measure, and -m u2net is the fast option for big batches of simple products. Leave -ppm off anything with hair or glass, use -dc for coloured halos, and prefer -vm to -a, which matched it on speed only in the median. Run the default bria-rmbg only for non-commercial work, on a machine with memory to spare. Earlier this year ComfyUI also added native BiRefNet nodes, if you would rather run that family in a node graph on a GPU.
How We Tested
Machine: AMD Ryzen 7 9700X, 6 virtual CPUs, no GPU, 12 GB of RAM with about 6.9 GB free. Software: rembg 2.0.85 with onnxruntime 1.30.0 and PyMatting 1.1.16, models downloaded by rembg itself. Data: AIM-500 (Li, Zhang and Tao, IJCAI 2021, MIT licence; the original project distributes it as a folder), all 500 photos at original resolution, around 1,080 pixels on the short side. AIM-500 is not in the documented training data of u2net, ISNet or rembg's BiRefNet checkpoints; BiRefNet's general model did train on the DIS5K and P3M test sets, which is why we did not use them. Each model's mask was produced by rembg's own session code and resized to the original size exactly as remove() does; the edge modes called rembg's own functions with the command-line defaults. SAD is the sum of absolute alpha differences divided by 1,000. The edge band is every pixel within 10 pixels of a partly transparent pixel or the outline of the true matte. Time and peak memory exclude file decoding. The scripts and raw per-image scores are stored in our measurements folder for this article.
Frequently Asked Questions
What is the default model in rembg?
Since version 2.0.80, bria-rmbg, which is BRIA's RMBG-2.0. Before that it was u2net. The default applies to the rembg commands, the HTTP server and remove() when you pass no session. Check with pip show rembg; any version from 2.0.80 up uses RMBG-2.0 unless you pass -m.
Can I use rembg for commercial work?
rembg's own code is MIT-licensed, but each model carries its own licence. u2net and ISNet are Apache-2.0 and BiRefNet is MIT, all fine commercially. The default, RMBG-2.0, is CC BY-NC 4.0, and BRIA requires a commercial agreement for any commercial use. Pass -m u2net or -m isnet-general-use to stay on a permissive model.
Which rembg model is best for hair and portraits?
Of the models that ran on our 12 GB machine, ISNet with -vm. On 25 portraits it scored 8.74% edge error against 12.36% without -vm; u2net with -vm scored 9.07%. Avoid -ppm on portraits: it turns every hair pixel fully in or fully out.
How much RAM does rembg need?
u2net peaked at 2.1 GB and ISNet at 2.8 GB on one photo in our test. The BiRefNet models and the default bria-rmbg were killed after climbing past 6.6 to 6.9 GB on a 12 GB machine with about 6.9 GB free, and the lite model died the same way with every memory-saving ONNX Runtime setting we tried. Alpha matting (-a) added up to 2 GB more on large photos.
Is rembg alpha matting worth turning on?
Prefer ViTMatte (-vm). Alpha matting (-a) improved u2net's edges too, but less, and a few photos took 10 to 40 seconds or failed and fell back to the plain mask. ViTMatte improved more photos at a steady 1.3 to 1.5 seconds each, after a one-time 114 MB download.
Can rembg remove backgrounds from glass or transparent objects?
Not reliably. On 34 transparent objects u2net failed 24 times and ISNet 17 times, meaning the cutout overlapped less than half of the real object. -vm helped ISNet but did not fix it. For glassware, expect manual masking or a promptable matting model.