fp16 ONNX conversions of three BiRefNet checkpoints, changed so that they run in a browser with onnxruntime-web on WebGPU. They are used by Glinfs, a browser-only screen-capture-to-GIF tool. The weights are the upstream authors' work; this repository only converts them.
| File | Bytes | SHA-256 | Converted from |
|---|---|---|---|
birefnet-general-fp16.onnx |
519,348,204 | 809c204052cb841141fb261e4beefd313dd8035587246940bd73aa3c6d20207e |
ZhengPeng7/BiRefNet @ e2bf8e4460fc8fa32bba5ea4d94b3233d367b0e4, model.safetensors |
birefnet-lite-fp16.onnx |
122,466,609 | dd67588b7b3fe3d4b311a5f30d4298f3a3b5e2bd513c0c72c0e41c29fcb8e05e |
ZhengPeng7/BiRefNet_lite @ aa62cd87eafb9cc43056d08ef3615a14628b831d, model.safetensors |
birefnet-toonout-fp16.onnx |
519,348,204 | dd9c9fbc1a831b34aa8e2b7f9e28d42d44ac2debc37eedea85df33d1abbf038e |
joelseytre/toonout @ cbf720eca394edcde66b861a8a8c20fbabe9c748, birefnet_finetuned_toonout.pth |
The published ONNX exports of these networks fail or return empty masks on WebGPU. These files:
Split with more than 7 outputs and every Concat with more than 7 inputs (WebGPU
allows a limited number of storage buffers per shader);Sum with a chain of Add;GlobalAveragePool / ReduceMean in float32 (in fp16 the pooling overflows on WebGPU and
the mask becomes NaN);The conversion is reproducible byte for byte with
scripts/export-birefnet-onnx.py
in the Glinfs repository.
float32 [1, 3, 1024, 1024], RGB, scaled to 0..1 and normalised with the ImageNet mean
[0.485, 0.456, 0.406] and std [0.229, 0.224, 0.225].float32 [1, 1, 1024, 1024]. See the Glinfs model registry
(model-registry.js)
for the exact input / output names and whether the output needs a sigmoid.MIT, as upstream.
birefnet-general-fp16.onnx 519 MBbirefnet-toonout-fp16.onnx 519 MBbirefnet-lite-fp16.onnx 122 MB