Skip to content
ModelListedExternal
Browse files

Birefnet Toonout Onnx

ONNX export of joelseytre/toonout (ToonOut: BiRefNet fine-tuned for anime background removal — Muratori & Seytre, MIT, paper, code), converted so the model runs anywhere ONNX Runtime does — Node.js included, no Python.

KindOtherBase modeljoelseytre/toonoutVersionRevision 2ded6feBgrade

Model source

Kind
Other
File size
470–929 MB
Base model
joelseytre/toonout
Version
vRevision 2ded6fe
Updated
Oct 9, 2026
Downloads
0
Source
Hugging Face

Source description

BiRefNet-ToonOut — ONNX

ONNX export of joelseytre/toonout (ToonOut: BiRefNet fine-tuned for anime background removal — Muratori & Seytre, MIT, paper, code), converted so the model runs anywhere ONNX Runtime does — Node.js included, no Python.

Converted with torch.onnx.export (opset 17) plus deform_conv2d_onnx_exporter for the decoder's deformable convolutions. Conversion script: experiments/003-toonout-onnx in the sprited repo.

Files

  • birefnet-toonout-fp16.onnx — fp16 weights, fp32 inputs/outputs (no Float16Array juggling in JS). This is what sprited downloads.
  • birefnet-toonout.onnx — fp32 original export.

I/O

nameshapedtype
inputimage[1, 3, 1024, 1024]float32
outputmask[1, 1, 1024, 1024]float32 (sigmoid, 0..1)

Preprocessing: plain resize to 1024×1024, RGB / 255, ImageNet normalization (mean 0.485, 0.456, 0.406, std 0.229, 0.224, 0.225). Postprocessing: resize mask back to the source size, use as alpha.

Usage (Node.js)

import ort from "onnxruntime-node";
const session = await ort.InferenceSession.create("birefnet-toonout-fp16.onnx");
const { mask } = await session.run({ image: new ort.Tensor("float32", chw, [1, 3, 1024, 1024]) });

Or just npx sprited gen char — sprited uses this model for matting by default.

Sources

1 source
Hugging FacePrimaryVersion 2ded6fe6063fe146b7b30d8b4cfc5636df322525
huggingface.co/sprited/birefnet-toonout-onnx/tree/2ded6fe6063fe146b7b30d8b4cfc5636df322525

Verified Oct 9

Download files

Model artifacts

2 artifacts

birefnet-toonout-fp16.onnx

onnx · 470 MB · SHA-256 213a8a98ee42…8a83 · Hugging Face

Download file

birefnet-toonout.onnx

onnx · 929 MB · SHA-256 7bf241633f4e…506c · Hugging Face

Download file

Source excerpts

3 excerpts

--- license: mit base_model: joelseytre/toonout pipeline_tag: image-segmentation tags: - background-removal - anime - onnx - birefnet --- # BiRefNet-ToonOut — ONNX ONNX export of [joelseytre/toonout](https://huggingface.co/joelseytre/toonout) (ToonOut: BiRefNet fine-tuned for anime background removal — Muratori & Seytre, MIT, [paper](https://arxiv.org/abs/2509.06839), [code](https://github.com/MatteoKartoon/BiRefNet)), converted so the model runs anywhere ONNX Runtime does — Node.js included, no Python. Converted with `torch.onnx.export` (opset 17) plus [`deform_conv2d_onnx_exporter`](https://github.com/masamitsu-murase/deform_conv2d_onnx_exporter) for the decoder's deformable convolutions. Conversion script: [`experiments/003-toonout-onnx`](https://github.com/sprited-ai/sprited/tree/main/experiments/003-toonout-onnx) in the sprited repo. ## Files - `birefnet-toonout-fp16.onnx` — fp16 weights, **fp32 inputs/outputs** (no Float16Array juggling in JS). This is what [sprited](https://github.com/sprited-ai/sprited) downloads. - `birefnet-toonout.onnx` — fp32 original export. ## I/O | | name | shape | dtype | |---|---|---|---| | input | `image` | `[1, 3, 1024, 1024]` | float32 | | output | `mask` | `[1, 1, 1024, 1024]` | float32 (sigmoid, 0..1) | Preprocessing: plain resize to 1024×1024, RGB / 255, ImageNet normalization (mean `0.485, 0.456, 0.406`, std `0.229, 0.224, 0.225`). Postprocessing: resize mask back to the source size, use as alpha. ## Usage (Node.js) ```js import ort from "onnxruntime-node"; const session = await ort.InferenceSession.create("birefnet-toonout-fp16.onnx"); const { mask } = await session.run({ image: new ort.Tensor("float32", chw, [1, 3, 1024, 1024]) }); ``` Or just `npx sprited gen char` — sprited uses this model for matting by default.

Source context: 0 downloads · 2 likes · Pipeline image-segmentation · Library birefnet · Repo sprited/birefnet-toonout-onnx

Source context: 0 downloads · 1 likes · Pipeline image-segmentation · Library birefnet · Repo sprited/birefnet-toonout-onnx