// in-browser model · portrait matting

MODNet portrait matting

modnet@fa2fa546 fp16 vetted · active onnxruntime-web ≥ 1.17.0 wasmwebgpu

Downloads 12.4 MB once from models.skillsafe.ai, then stays cached for every SkillSafe app that uses it. Inference runs on your device; nothing you enter is uploaded to load it. Licensed Apache-2.0 · source Hugging Face Xenova/modnet at fa2fa546052f.

See it working

Public apps that declare this model. Open one and the download you see is this file.

  • BG Studio — on-device background remover

    Remove or replace image backgrounds with AI that runs 100% in your browser — photos are never uploaded. Replace with colors, gradients, your own image or a blurred original; refine with erase/restore brushes; auto color enhance; export PNG/JPEG/WebP. Free and unlimited. Built on U2-Net (Qin et al., Apache-2.0), onnxruntime-web (Microsoft, MIT) and rembg's ONNX export (MIT).

    83 visits
    Open app

Files

Every file is served at an immutable URL; the canonical form is the SHA-256 itself. Tokenizer and config JSON are not here by design — they ship in your app bundle.

PathFormatSizeSHA-256
onnx/model_fp16.onnx onnx 12.4 MB 25f165da9bfd…fe5cf6

Signature

Graph inputs and outputs read from the ONNX bytes at vetting — these are the tensor names your session.run() call feeds and reads. Symbolic dimensions are shown by name.

Inputs

  • input float32 [batch_size, 3, height, width]

Outputs

  • output float32 [batch_size, 1, height, width]

How to use it

Three steps: declare the model on your release, load it through the SDK (verified and cached), hand the bytes to the runtime. The examples below are generated from this entry, so ids, paths and tensor names are exact.

Add to the body of POST /v1/apps/{slug}/releases (or a release session). An unknown or withdrawn model is refused with a 400 naming it; the app page then shows "downloads 12.4 MB · runs on your device" and /models.txt carries the attribution.

{
  "models": [
    {
      "id": "modnet",
      "revision": "fa2fa546"
    }
  ]
}

Licence & attribution

Apache-2.0 · licence text · notice

MODNet: Trimap-Free Portrait Matting in Real Time (Ke et al.). ONNX fp16 export published by Xenova on Hugging Face. Licensed under the Apache License 2.0.

Apps that declare this model get this text in their generated /models.txt, so a licence that requires a notice always carries one.