rembg-rs

OPEN SOURCE · RUST · CANDLE

Background removal,
running on your machine.

A native Rust implementation of Bria RMBG-3.0. Drop an image into the local UI, call the HTTP endpoint, or run it from your terminal.

Model weights are CC BY-NC 4.0. Commercial use needs a Bria license.

MATTE / 01LOCAL INFERENCE
ALPHA · 8 BIT ++
INPUT 01 IMAGEOUTPUT RGBA PNG
15.97swarm median · RTX 4090
INT8packed ConvRot weights
4Flow Euler steps
MITrepository code license

01 / RUN IT

One download.
Then work locally.

Fetch the public quantized model bundle once. Downloading uses Python's small huggingface_hub package; native inference runs without Python or an HF token.

Read setup details
TERMINALREADY
# Download model files (~13.6 GB) $ cargo run --release -- fetch-comfy # Remove a background $ cargo run --release --features cuda-cudnn \ -- remove portrait.jpg cutout.png # Or start the local web UI and API $ cargo run --release --features cuda-cudnn \ -- serve --addr 127.0.0.1:8080 ✓ Web UI http://127.0.0.1:8080/
native backendCUDA + cuDNN

02 / MEASURED

Measured against
the ComfyUI path.

End-to-end warm request time on a 1410 × 1080 image. Same RTX 4090, INT8 model bundle, and four inference steps.

See the full benchmark

03 / PIPELINE

Rust around
the full model.

01Qwen3-VLImage + instruction encoding · CPUENCODE
02FLUX.2 VAEContext latents · BF16ENCODE
03Fibo-2Four denoising steps · INT8 CUDAINFER
04Alpha matteOriginal RGB + predicted alphaEXPORT

The server keeps one model loaded. Each request returns a full-size transparent PNG.

i

Check the model terms before use. The code is MIT licensed. Bria's RMBG-3.0 weights are CC BY-NC 4.0, which excludes commercial use without a separate license.

Model card