MODNet portrait matting (fp16)
Browser-ready import artifacts for portrait-matting, produced by SkillSafe's
reproducible converter (models/ in skillsafe.ai)
from a pinned upstream source. Every byte here is derivable from that source plus
the recipe below; nothing was edited by hand.
Provenance
| Upstream | https://huggingface.co/Xenova/modnet/tree/fa2fa546052fba4c08921230a26cc69a333fca12 |
| Upstream SHA-256 / commit | fa2fa546052fba4c08921230a26cc69a333fca12 |
| Recipe | recipes/modnet.yaml โ sha256 503d08383ef3e8588a9ab8b632eae7800778fbcff86eb27bde3a884a36e3ddeb |
| Toolchain | Python 3.12.13, torch 2.10.0, onnx 1.23.0, onnxruntime 1.30.0 on Darwin 25.6.0 arm64 |
| Converted | 2026-09-22T21:39:27+00:00 |
Files
| file | class | size | SHA-256 |
|---|---|---|---|
config.json |
bundle | 0.00 MB | e144d8af9b1f09649785c77f592a76bbc69504ae02e43700663b2a9f00d9c8a2 |
onnx/model_fp16.onnx |
registry (fp16) | 12.38 MB | 25f165da9bfd30830a575f1f0490f1acd995975cb349bc02f3d79332e1fe5cf6 |
preprocessor_config.json |
bundle | 0.00 MB | 07d83634b1fdd20142ca6e3fe55ab92b558f56d1b0f005ff3a7926f1c9e1165d |
registry files are parameter files served from models.skillsafe.ai once vetted;
bundle files ship inside an app; registry-shared is a runtime library reused by
every model of the same architecture.
Verification
Imported as published upstream (no conversion). Each file is pinned by SHA-256 to its source; every ONNX file passed onnx.checker and a CPU smoke run under onnxruntime with zero-filled inputs at the declared shapes:
| file | inputs | outputs | ms |
|---|---|---|---|
onnx/model_fp16.onnx |
input[1, 3, 512, 512] | output[1, 1, 512, 512] | 53.6 |
Use in the browser
import * as ort from "onnxruntime-web";
const session = await ort.InferenceSession.create("https://huggingface.co/skillsafe-ai/modnet/resolve/main/onnx/model_fp16.onnx", { executionProviders: ["webgpu", "wasm"] });
Contract (onnx/model_fp16.onnx): input input float32 ['batch_size', 3, 'height', 'width'] โ output output float32 ['batch_size', 1, 'height', 'width']. Opset 11.
Licence and attribution
MODNet: Zhanghan Ke et al. (City University of Hong Kong), Apache License 2.0 (https://github.com/ZHKKKe/MODNet); ONNX export by Xenova (https://huggingface.co/Xenova/modnet).
Licence: Apache-2.0 โ notice: https://github.com/ZHKKKe/MODNet/blob/master/LICENSE. The conversion recipe and this model card are part of the SkillSafe repository and carry its licence; the weights remain under the upstream licence above.
The full manifest.json in this repo records the recipe, sources, toolchain
(including the uv.lock hash) and per-file verification numbers.
- Downloads last month
- -
Model tree for skillsafe-ai/modnet
Base model
Xenova/modnet