htdemucs-onnx (fp16 weights)

An ONNX export of HT-Demucs (Hybrid Transformer Demucs, htdemucs) for 4-stem music source separation โ€” drums, bass, other, vocals.

This repository is a re-host, not a new model. It exists so that Audio Magic has a stable, pinned copy of a browser-loadable Demucs export rather than depending on a third-party repo that could move or change. Nothing has been modified.

Provenance

Original model Demucs v4 / HT-Demucs โ€” Meta Platforms, MIT
ONNX conversion StemSplitio/htdemucs-onnx, revision d54ed9eb60e258ea82131c6ee14578628816456a
File htdemucs_fp16weights.onnx โ†’ htdemucs_fp16.onnx
Size 165,612,636 bytes
SHA-256 d05c269d0178d2a72ad484b10b11dd370193fc923201c3b27a99f848745db70a

The file is byte-identical to the upstream conversion at that revision. Verify with:

shasum -a 256 htdemucs_fp16.onnx

Inputs and outputs

Name Shape Dtype
Input mix (1, 2, 343980) float32
Output stems (1, 4, 2, 343980) float32
  • Stereo, 44.1 kHz, 7.8-second segments (343,980 samples), samples in [-1, 1].
  • Output stem order: [drums, bass, other, vocals].
  • For longer audio, process in overlapping segments and overlap-add.

Verification

Checked with onnxruntime-node on CPU against a synthetic four-source mixture with known ground truth:

  • Reconstruction: 37.0 dB SNR โ€” the four stems sum back to the input, the property Demucs is built to have, which is the strongest available evidence that the conversion is faithful.
  • Drums correlate 0.99 and bass 1.00 with their ground-truth sources, with negligible cross-leakage.
  • Vocals were not meaningfully testable this way: a synthetic harmonic tone is not singing, and the model reasonably classified it as an instrument. Vocal quality should be judged on real recordings.
  • Speed: 1.1 s per 7.8 s segment on native CPU โ€” a realtime factor of ~0.14ร—.

Licence

Demucs and its pretrained weights are released by Meta under the MIT licence, which permits redistribution provided the copyright notice travels with it. The full notice is included in this repository as LICENSE and reproduced here:

MIT License

Copyright (c) Meta Platforms, Inc. and affiliates.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Citation

If you use this, cite the original authors โ€” the work is theirs:

@inproceedings{rouard2023hybrid,
  title     = {Hybrid Transformers for Music Source Separation},
  author    = {Rouard, Simon and Massa, Francisco and D{\'e}fossez, Alexandre},
  booktitle = {ICASSP 23},
  year      = {2023}
}

@inproceedings{defossez2021hybrid,
  title     = {Hybrid Spectrogram and Waveform Source Separation},
  author    = {D{\'e}fossez, Alexandre},
  booktitle = {Proceedings of the ISMIR 2021 Workshop on Music Source Separation},
  year      = {2021}
}
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support