v0.3.0 — browser, htdemucs/htdemucs_6s, docs site
[0.3.0] - 2026-05-21 — Browser support, more models, docs site
This release adds browser inference via onnxruntime-web, two new
model flavors (htdemucs and htdemucs_6s), a published documentation
site, and a session-pooling fix for repeated calls. Highlights:
Added
- New
htdemucsflavor — single-file 4-stem ONNX model. ~30%
faster than the FT bag (1 session instead of 4), slightly lower SDR.
New HF repo:
StemSplitio/htdemucs-onnx.
Use viaseparate(model="htdemucs"). - New
htdemucs_6sflavor — single-file 6-stem ONNX model with
guitar and piano in addition to the standard 4 stems. The
only ONNX export of the 6-stem variant on the Hub. New HF repo:
StemSplitio/htdemucs-6s-onnx.
Use viaseparate(model="htdemucs_6s")or
separate_stem("song.mp3", "guitar"). demucs_onnx.browsermodule + CLI commands —
demucs-onnx browser-config --bundler {vite|webpack|esbuild|next|rollup}
prints a ready-to-pasteonnxruntime-webconfig snippet for each
major bundler.demucs-onnx browser-demo PATH [--react]
scaffolds the in-tree vanilla-HTML or Vite + React + TS demo into a
directory so users can runpython -m http.serverand try it
locally without cloning anything.examples/browser/— zero-build vanilla HTML/JS demo that loads
the 166 MB fp16weights vocals model from HF and separates a WAV via
FileReader. Chunked overlap-add ported from the Pythoninfer.py.examples/browser-react/— minimal Vite + React + TS demo with
the same flow, prettier UI, multi-thread WASM via COOP/COEP.prewarm(models=[...])— pre-download and pre-compile ORT
sessions so the firstseparate()call doesn't pay the CoreML
graph-compile or HF-download tax. Newdemucs-onnx prewarmCLI too.SessionPool+session_pool()— process-wide session cache so
repeatedseparate*calls reuse compiled graphs. Especially
valuable for CoreML EP (the firsthtdemucs_ftbag call previously
triggered 4 separate CoreML graph compilations).- Docs site at
stemsplit.github.io/demucs-onnx
built with MkDocs Material +mkdocstrings[python]. Pages:
Install, CLI, Python API (autogenerated), Browser support, Models,
Export your own, Comparison, Changelog. Deploys from
.github/workflows/docs.ymlon push to main. ALL_KNOWN_STEMS— re-exported as a top-level constant
(drums,bass,other,vocals,guitar,piano).
Changed
list_models()shape — each entry now also carrieskind
("specialist_bag"/"single"/"specialist") and
sources(comma-joined stem list). CLIlist-modelsoutput
updated to a five-column table.separate_stem(..., "guitar")andseparate_stem(..., "piano")
auto-route tohtdemucs_6sinstead of erroring out.- CLI
--stemacceptsguitar/piano(auto-routes). - Quiet
huggingface_hubHTTP logs in non-verbose mode and disable
hf-hub progress bars when--quiet. [project.urls]addsDocumentation = "https://stemsplit.github.io/demucs-onnx/"and aChangelogURL.
Fixed
- Specialist bag re-compilation on every call —
separate()now
reuses sessions from the process-wide pool, eliminating the
multi-minute CoreML graph-compile tax on every call after the first
when usingmodel="htdemucs_ft"in a long-running process.
New model parity (vs PyTorch fp32, random 1×2×343980 input)
| Model | max abs diff | tolerance |
|---|---|---|
htdemucs.onnx |
6.62 × 10⁻⁴ | 1 × 10⁻³ |
htdemucs_fp16weights.onnx |
+ 4.6 × 10⁻⁵ (vs fp32 weights) | 1 × 10⁻³ |
htdemucs_6s.onnx |
2.42 × 10⁻⁴ | 1 × 10⁻³ |
htdemucs_6s_fp16weights.onnx |
+ 1.06 × 10⁻⁴ (vs fp32 weights) | 1 × 10⁻³ |