Run RMBG 3.0, Bria's newest background removal model, on your own hardware with a self-hosted license. This guide installs the model, downloads its weights from Bria, and removes the background from a first image.
Both remove backgrounds, and each is licensed on its own: an RMBG 2.0 license does not cover RMBG 3.0.
| RMBG 3.0 | RMBG 2.0 | |
|---|---|---|
| Best for | Quality first: cleaner edges on hair, fur, transparent objects and fine detail | High volume and low latency |
| Speed | About 6 seconds an image on an NVIDIA L40S | Much faster |
| GPU memory | 32 GB or more | Fits on small GPUs |
| Python | 3.11 or 3.12 | 3.10 or newer |
Use RMBG 2.0 for faster inference on smaller, cheaper GPU machines. Use RMBG 3.0 when quality matters most.
- An active RMBG 3.0 self-hosted license (pricing)
- One of your organization's API keys
- A machine with an NVIDIA GPU with 32 GB of memory or more, Python 3.11 or 3.12, and about 26 GB of disk for the weights
- For the manual install:
curlandjq, and network access to the Bria Engine, AWS CodeArtifact and Bria's weights CDN (no Hugging Face account)
Buy an RMBG 3.0 license on the pricing page. You manage it, and see the installation steps, on the Licenses tab in the Console.
Bria Studio installs the package, downloads the weights, and runs a test for you:
npx @bria-ai/studioPick RMBG 3.0 when Studio lists your licensed models. It installs rmbg-3 into a Python 3.12 virtual environment at ~/.bria/venvs/rmbg-3.0, downloads the weights, and removes a sample background to confirm the setup.
RMBG 3.0 needs Studio 0.5.0 or newer. If Studio does not list it, run npx @bria-ai/studio@latest.
Run from the environment the model is installed in. If you used Studio, activate the venv it created:
source ~/.bria/venvs/rmbg-3.0/bin/activateThen load the model with your API key and remove a background. On first load setup() checks your license and downloads the weights to ~/.bria/models, which takes a few minutes; later runs reuse them.
import os
from rmbg_3 import RMBG3, RMBG3Config, RMBG3Input
# Reads BRIA_API_TOKEN; checks the license and downloads ~26 GB of weights on first load.
pipe = RMBG3(config=RMBG3Config(api_token=os.environ["BRIA_API_TOKEN"]))
pipe.setup()
result = pipe.execute([RMBG3Input(image="https://bria-test-images.s3.us-east-1.amazonaws.com/strawberry.jpg")])[0]
result.image.save("cutout.png") # RGBA cutout with a transparent background
pipe.cleanup() # free the GPU when you are donePass a URL or local path to RMBG3Input.image. Set return_mask=True to also get the grayscale matte as result.mask (white is the subject). The request and the result are the same as RMBG 2.0's, so code written for RemoveBG moves over by changing the class names.
Inputs and outputs stay on your machine — only a small attribution vector is sent to Bria.
No license for RMBG 3.0
Your account holds no active RMBG 3.0 license, so the install stops before anything downloads. An RMBG 2.0 license does not cover RMBG 3.0. Buy or renew it on the Licenses tab.
LicenseError when the model starts
The license was cancelled or ended. Open the Licenses tab — the error links straight to it. A card retry (past_due) stays active.
The model won't load and asks for an API token
No BRIA_API_TOKEN is set. Set it, or pass RMBG3Config(api_token="...").
torch.cuda.is_available() is False during setup()
The installed PyTorch doesn't match your NVIDIA driver. pip's default PyTorch needs driver 580 or newer. Install the CUDA 12.8 build first, as in step 2.
CUDA out of memory during setup() or the first image
RMBG 3.0 needs a GPU with 32 GB of memory or more. On a smaller GPU, use RMBG 2.0.
WeightsError during download
The download was interrupted. Run again — it resumes where it stopped.
Self-hosted runs are counted against your RMBG 3.0 license and shown in Usage & billing in the Console, tagged as self-hosted. See Self-hosted models for how licensing and billing work across models.