Skip to content

Runs in the browser · Vision

Run BiRefNet Lite in your browser

BiRefNet Lite downloads 109.2 MB over WebGPU (fp16), or 109.2 MB over WebAssembly (fp16), to strip backgrounds from images entirely in the tab with Transformers.js. No install, no server.

Vision · onnx-community/BiRefNet_lite-ONNX

WebGPU download
109.2 MB
fp16
WASM download
109.2 MB
fp16
Parameters
44.36M
Pipeline task
background-removal

Reading

Only fp16 and fp32 builds are published for this repo, no quantized variant yet.

2.46 MB/M params against a 1.73 MB/M vision median: dense for its parameter count.

Will it run in your browser?

Live check this browser

Checking for WebGPU support…

All measured variants

Quant Download size
Variant Size
fp16 WebGPU pick WASM pick 109.2 MB
fp32 213.6 MB

Sizes measured from the HuggingFace API file tree for onnx-community/BiRefNet_lite-ONNX, not estimated.

Use it with Transformers.js

import { pipeline } from "@huggingface/transformers";

const pipe = await pipeline("background-removal", "onnx-community/BiRefNet_lite-ONNX", {
  device: "webgpu", // usually falls back to "wasm"; wrap in try/catch for production
  dtype: "fp16", // use "fp16" for the WASM build
});

const result = await pipe(/* your input */);

Requires npm install @huggingface/transformers (or the CDN build).

Sources

Same job, different size

FAQ

WebGPU or WASM for BiRefNet Lite, in practice?

Chrome, Edge, and Safari 26+ run the WebGPU build (fp16) on the GPU. Firefox has WebGPU on Windows and Apple Silicon Macs but not everywhere yet. Any browser without a WebGPU adapter falls back automatically to the WebAssembly build (fp16) on CPU: same model, slower to load, slower to run.

What does fp16 mean for BiRefNet Lite?

The WebGPU build here uses fp16: 16-bit floating point (half precision): smaller than fp32 with effectively no quality loss. The WASM fallback uses fp16: 16-bit floating point (half precision): smaller than fp32 with effectively no quality loss.

Sizes measured 2026-08-01 from the HuggingFace API. Last validated 2026-08-03. See all browser models or the methodology.