Views
No views yet
safetensors format for inference on Apple Silicon.drums, bass, other, vocals (and guitar, piano for 6-source models).| Model | What it is | Architecture | Sub-models | Sources | Weights (fp16) | Weights (fp32) |
|---|---|---|---|---|---|---|
htdemucs | Default v4 model, best speed/quality balance | HTDemucs (v4) | 1 | 4 | 80 MB | 160 MB |
htdemucs_ft | Fine-tuned v4, best overall quality | HTDemucs (v4) | 4 (fine-tuned) | 4 | 321 MB | 641 MB |
htdemucs_6s | 6-source v4 (adds guitar + piano stems) | HTDemucs (v4) | 1 | 6 | 52 MB | 105 MB |
hdemucs_mmi | v3 hybrid, trained on more data | HDemucs (v3) | 1 | 4 | 160 MB | 319 MB |
mdx | v3 bag-of-models ensemble | Demucs + HDemucs | 4 (bag) | 4 | 659 MB | 1.3 GB |
mdx_extra | v3 ensemble trained on extra data | HDemucs | 4 (bag) | 4 | 638 MB | 1.2 GB |
mdx_q | Quantized v3 ensemble (same quality, smaller) | Demucs + HDemucs | 4 (bag) | 4 | 659 MB | 1.3 GB |
mdx_extra_q | Quantized v3 extra ensemble | HDemucs | 4 (bag) | 4 | 638 MB | 1.2 GB |
| Metric | float32 (iky1e/demucs-mlx) | float16 (this repo) |
|---|---|---|
| htdemucs file size | 160 MB | 80 MB |
| htdemucs RSS (peak memory) | 1311 MB | 1210 MB |
| htdemucs speed (M1 Pro) | 7.1s | 7.9s |
| Output quality | reference | identical |
{model_name}.safetensors — model weights (float16){model_name}_config.json — model class, architecture config, and bag-of-models metadata1# Use float16 models from local directory
2demucs-mlx-swift -n htdemucs --model-dir /path/to/demucs-mlx-fp16 song.wav
3
4# Or set the HF repo environment variable
5export DEMUCS_MLX_SWIFT_MODEL_REPO=iky1e/demucs-mlx-fp16
6demucs-mlx-swift -n htdemucs song.wav1import DemucsMLX
2
3let separator = try DemucsSeparator(modelName: "htdemucs")
4let result = try separator.separate(fileAt: URL(fileURLWithPath: "song.wav"))1pip install demucs safetensors numpy
2
3# Export all 8 models as float16 (default)
4python export_from_pytorch.py --out-dir ./output
5
6# Export as float32
7python export_from_pytorch.py --out-dir ./output --dtype float32export_from_pytorch.py) is available in the demucs-mlx-swift repo under scripts/.1@inproceedings{rouard2022hybrid,
2 title={Hybrid Transformers for Music Source Separation},
3 author={Rouard, Simon and Massa, Francisco and Defossez, Alexandre},
4 booktitle={ICASSP 23},
5 year={2023}
6}
7
8@inproceedings{defossez2021hybrid,
9 title={Hybrid Spectrogram and Waveform Source Separation},
10 author={Defossez, Alexandre},
11 booktitle={Proceedings of the ISMIR 2021 Workshop on Music Source Separation},
12 year={2021}
13}