Removing the background from a photo is easy now. Removing it from a video, cleanly, with a real transparent alpha channel and without paying a subscription, is still hard. BEN3, released by Prama LLC (BackgroundErase) on 1 December 2026, handles both in one small, free model.
The checkpoint is only 465 MB, it is MIT licensed, and it can write a transparent VP9 WebM straight from an MP4, audio included. That makes it one of the easiest ways to cut a person out of a clip on your own PC.
This guide covers what BEN3 is and what the open release leaves out, how to install it, copy-ready Python for images, batches and video, how to get transparent WebM or green-screen MP4 output, how it compares with RMBG and BiRefNet, and the licence detail you need to know before commercial use.
All facts are checked against the official Hugging Face model card and GitHub repo as of 6 December 2026.
- What: free background removal for images and video, with alpha masks.
- Install:
pip install git+https://github.com/PramaLLC/BEN3.git - Size: one 465 MB checkpoint (
ben3.pth). - Video:
segment_video()writes a transparent WebM or a solid-colour MP4, and can keep the audio. Needs ffmpeg. - Licence: MIT, but the DINOv3 encoder inside carries Meta’s DINOv3 licence, so read both before commercial use.
- Catch: the open model is the first stage only. The paid API adds a second refinement network.
Want an overview of every local option first? See my guide to removing backgrounds locally.
What BEN3 Is
BEN stands for Background Erase Network. BEN3 is the third version from Prama LLC, the company behind the BackgroundErase web service. The research paper behind it describes a framework called MHFNet, by Maxwell Meyer and Jack Spruyt.
In short, here is how it works:
- Encoder: a DINOv3 ViT-B/16 vision backbone from Meta. Its weights are bundled inside
ben3.pth, so nothing extra downloads. - Decoder: a DPT-style decoder that fuses features at several scales, which is good for hair and fine edges.
- Multi-hypothesis output: the model draws three candidate masks and a small learned scoring head picks the best one.
- Default size: 1024 x 1024 inference.
For each image you get two things back: the cut-out foreground as an RGBA image, and an 8-bit greyscale alpha mask. For video, it processes frames in batches and stitches them back into a clip.
| Item | Detail |
|---|---|
| Release | 1 December 2026 |
| Developer | Prama LLC / BackgroundErase |
| Checkpoint | ben3.pth, 465 MB |
| Code file | ben3.py (32 kB) |
| Encoder | DINOv3 ViT-B/16 |
| Inputs | Images (single or batched), MP4 video |
| Outputs | RGBA foreground, alpha mask, transparent WebM, solid-colour MP4 |
| Licence | MIT, subject to third-party terms (DINOv3) |
What Is Open and What Is Not
This is the most important thing to understand before you judge BEN3’s quality.
Both the model card and the GitHub README say the open release is the multi-hypothesis generator only. The full commercial model adds a second-stage fusion network that refines the result, and that part is not public. You can only use it through backgrounderase.com, its API, or a licence deal.
Two practical effects:
- The demo results on the company website may look better than what you get locally.
- The benchmark table on the model card (Weighted F 0.905 on DIS-TE1-4) is for the full MHFNet research framework. The card itself says those numbers are “not the standalone BEN3 generator released in this repository.”
That does not make the open model bad. It is still a modern, high-resolution matting model that runs on modest hardware. Just test it on your own footage rather than trusting the headline score.
Install BEN3
You need Python with PyTorch and, for video, ffmpeg. An NVIDIA GPU is strongly recommended. The examples use device="cuda".
Option 1: pip from GitHub (easiest)
python -m venv ben3-env
# Windows: ben3-env/Scripts/activate
# Linux/macOS: source ben3-env/bin/activate
pip install git+https://github.com/PramaLLC/BEN3.git
The model weights download from Hugging Face the first time you call from_pretrained.
Option 2: download the files yourself
Clone or download the Hugging Face repo PramaLLC/BEN3, then:
pip install -r requirements.txt
Keep ben3.py and ben3.pth in the same folder as your script.
Install ffmpeg for video
The card says “ffmpeg and ffprobe must be installed for transparent WebM output and audio muxing.”
- Windows:
winget install ffmpeg, then open a new terminal. - macOS:
brew install ffmpeg - Ubuntu/Debian:
sudo apt install ffmpeg
Check it works with ffmpeg -version.
Remove a Background from an Image
This is the official example from the model card:
from PIL import Image
from ben3 import BEN3
model = BEN3.from_pretrained(
"PramaLLC/BEN3",
device="cuda",
)
foreground, mask = model.inference(Image.open("input.jpg"))
foreground.save("foreground.png")
mask.save("mask.png")
If you downloaded the checkpoint manually, load it by path instead:
model = BEN3("ben3.pth", device="cuda")
Save the foreground as PNG or WebP. JPEG has no transparency, so a JPEG save throws the alpha away.
The separate mask.png is useful too. In Photoshop, GIMP or Affinity you can load it as a layer mask and refine it with a brush, which is often faster than fixing a baked-in cut-out.
Several images at once
images = [Image.open("a.jpg"), Image.open("b.jpg")]
foregrounds, masks = model.inference(images)
Passing a list runs them as a batch on the GPU, which is quicker than looping one at a time.
Remove a Background from a Video
This is where BEN3 stands out. One call turns an MP4 into a transparent clip:
model.segment_video(
"input.mp4",
output_path="foreground.webm",
batch=8,
webm=True,
add_audio=True,
)
webm=Truewrites a VP9 WebM with an alpha channel.add_audio=Truecopies the original soundtrack across.batch=8processes eight frames at a time. Lower it if you run out of VRAM, raise it on a big card.
Need a plain background instead, for example white for a product video or green for later keying? Use rgb_value:
model.segment_video(
"input.mp4",
output_path="foreground.mp4",
batch=8,
rgb_value=(255, 255, 255),
)
Change (255, 255, 255) to (0, 255, 0) for a classic green screen.
Which video output should you pick?
| Goal | Use |
|---|---|
| Overlay a person on a new scene in a web page | Transparent WebM (browsers support VP9 alpha in Chrome, Edge and Firefox) |
| Edit in DaVinci Resolve or Premiere | Green-screen MP4, then key it, or convert the WebM to a ProRes 4444 file with ffmpeg |
| Social video with a clean background | Solid-colour MP4 |
| Further AI work in ComfyUI | Export frames plus masks as PNGs (see below) |
Not every editor reads alpha in WebM. If yours ignores transparency, convert it to ProRes 4444 with ffmpeg, which keeps alpha and imports almost everywhere:
ffmpeg -c:v libvpx-vp9 -i foreground.webm -c:v prores_ks -profile:v 4444 -pix_fmt yuva444p10le foreground.mov
The -c:v libvpx-vp9 before the input forces the decoder that reads the alpha layer.
Batch a Whole Folder
Here is a short script I use to process every image in a folder. It only uses the official inference call:
from pathlib import Path
from PIL import Image
from ben3 import BEN3
model = BEN3.from_pretrained("PramaLLC/BEN3", device="cuda")
src = Path("input")
out = Path("output")
out.mkdir(exist_ok=True)
files = sorted(p for p in src.iterdir() if p.suffix.lower() in {".jpg", ".jpeg", ".png", ".webp"})
for i in range(0, len(files), 4):
chunk = files[i:i + 4]
imgs = [Image.open(p).convert("RGB") for p in chunk]
fgs, masks = model.inference(imgs)
for p, fg, m in zip(chunk, fgs, masks):
fg.save(out / f"{p.stem}.png")
m.save(out / f"{p.stem}_mask.png")
Chunks of four keep memory steady. Change the number to suit your GPU.
Use the Output in Editors and ComfyUI
Kombitz reported that a community ComfyUI node appeared the day after release, but no link was given and I could not find a verified repo. So for now, the cleanest ComfyUI route is:
- Run BEN3 in Python to produce RGBA PNGs or a frame sequence with masks.
- Load them in ComfyUI with Load Image (the alpha becomes the MASK output) or a video loader.
- Use the mask for inpainting, compositing or relighting.
If you would rather stay entirely inside ComfyUI, my ComfyUI-RMBG 3.3 guide covers a node pack with several matting models built in. For video work in ComfyUI generally, start with my ComfyUI guide.
BEN3 vs RMBG vs BiRefNet
There is no official head-to-head between the open BEN3 checkpoint and other models. Here is what the published numbers do and do not tell you.
The model card’s DIS-TE1-4 table (2,000 images) compares the full MHFNet framework with others:
| Model | Weighted F | Max F | MAE (lower is better) |
|---|---|---|---|
| BiRefNet | 0.858 | 0.900 | 0.035 |
| MVANet | 0.861 | 0.908 | 0.035 |
| DiffDIS | 0.892 | 0.911 | 0.027 |
| MHFNet (full framework) | 0.905 | 0.922 | 0.026 |
Remember: that MHFNet row includes the private refinement stage. The free BEN3 file will sit somewhere below it.
A practical comparison:
| BEN3 (open) | BiRefNet | RMBG models | |
|---|---|---|---|
| Video with alpha built in | Yes, WebM plus audio | Frame by frame via tools | Depends on the tool |
| Checkpoint size | 465 MB | Varies by variant | Varies |
| ComfyUI node | Community only, unverified | Several packs | Several packs |
| Licence | MIT plus DINOv3 terms | Check each variant | Check each version; some are non-commercial |
My suggestion: use BEN3 when you want video with alpha in one step, and keep a BiRefNet or RMBG node in ComfyUI for image-heavy pipelines. Test all of them on a few of your own hard shots, such as hair, glass and motion blur.
Licence: Read This Before Commercial Use
BEN3 is “released under the MIT License, subject to applicable third-party licensing terms.” The main third party is Meta: the DINOv3 encoder is bundled in the checkpoint, and Meta releases DINOv3 code and weights “under the DINOv3 License”.
Kombitz calls that licence narrower than MIT. I have not checked every clause, so if you plan to sell a product or service built on BEN3, read Meta’s DINOv3 LICENSE.md on GitHub yourself, or ask Prama about a commercial licence. For personal projects, YouTube edits and learning, it is generally a non-issue.
One more safety note: ben3.pth is a PyTorch pickle file. Hugging Face’s scan shows only standard tensor imports, but as a habit only load .pth files from the official repo.
Common Problems and Fixes
| Problem | Cause | Fix |
|---|---|---|
| WebM has no transparency | ffmpeg missing or player ignores alpha | Install ffmpeg; check in Chrome; convert to ProRes 4444 |
| No audio in output | add_audio not set or ffprobe missing |
Set add_audio=True; confirm ffprobe -version |
| CUDA out of memory on video | Batch too large | Lower batch to 4 or 2; see my CUDA out of memory fix |
| Black background in saved image | Saved as JPEG | Save as PNG or WebP |
| Flicker at edges in video | Each frame predicted independently | Shoot with clear subject separation; light temporal blur on the mask in your editor |
| Results worse than the website | Open release lacks the refinement stage | Expected; use the API for those cases |
FAQ
Is BEN3 free?
Yes. The weights and code are free under MIT, subject to Meta’s DINOv3 licence for the bundled encoder.
Can BEN3 remove video backgrounds?
Yes. segment_video() produces a transparent WebM or a solid-colour MP4, with optional audio.
Does BEN3 need a GPU?
The examples use CUDA. Prama does not publish VRAM figures, but a 465 MB model runs comfortably on consumer NVIDIA cards. Lower the video batch on small cards.
Is there a ComfyUI node for BEN3?
A community node was reported, but I could not verify a link. Use the Python scripts and load the results into ComfyUI.
Why is my result not as good as backgrounderase.com?
The open model is the first stage only. The website and API add a second refinement network that is not released.
Can I use BEN3 commercially?
BEN3’s own code is MIT, but the DINOv3 encoder has its own licence. Read it, or contact Prama, before commercial use.
What video format should I use for editing?
Convert the WebM to ProRes 4444 with ffmpeg if your editor does not read WebM alpha.
Sources
- PramaLLC/BEN3 model card (files, usage, benchmark, licence)
- BEN3 on GitHub
- Meta DINOv3 repository (DINOv3 licence)
- Kombitz roundup, 5 December 2026




