HTDemucs (ONNX, INT8 weights, for phones)
ONNX version of the network of HTDemucs
(Meta AI), the four-stem music source separation model (drums, bass, other,
vocals), with its MatMul and Gemm weights quantised to INT8 for ONNX Runtime
on phone CPUs. It is a dynamic quantisation, made with ONNX Runtime's
quantize_dynamic, of the FP32 export
Ghilda/htdemucs-onnx, itself
converted from Meta's MIT-licensed htdemucs weights. Convolutions stay in
FP32.
The model has one fixed input shape, a 7.8 s stereo segment at 44.1 kHz (343,980 samples), and does not contain the STFT / iSTFT: the caller computes the spectrogram and rebuilds the stems. Inputs and outputs are FP32, as in the FP32 export.
| Input | Shape |
|---|---|
mix, stereo waveform |
1 x 2 x 343980 |
mag, complex-as-channels STFT (n_fft 4096, hop 1024) |
1 x 4 x 2048 x 336 |
| File | Size | SHA-256 |
|---|---|---|
htdemucs_int8.onnx |
84,912,686 bytes | dc98a5f91e35af56ea2aafbe92682b235ca7e5c41d85154429722cb4ca119896 |
Against the FP32 export, on three windows of one record, the outputs differ by 37-41 dB (spectral branch) and 35-40 dB (time branch), SNR. The file is half the size, and about 18% faster on an Apple M1 CPU with four threads.
License: MIT, see LICENSE. More: www.jenila.com.