Views
No views yet
Originally from: iky1e/demucs-mlxFloat16 variant: mlx-community/demucs-mlx-fp16
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 | Tensors |
|---|---|---|---|---|---|---|
htdemucs | Default v4 model, best speed/quality balance | HTDemucs (v4) | 1 | 4 | 160 MB | 573 |
htdemucs_ft | Fine-tuned v4, best overall quality | HTDemucs (v4) | 4 (fine-tuned) | 4 | 641 MB | 2292 |
htdemucs_6s | 6-source v4 (adds guitar + piano stems) | HTDemucs (v4) | 1 | 6 | 105 MB | 565 |
hdemucs_mmi | v3 hybrid, trained on more data | HDemucs (v3) | 1 | 4 | 319 MB | 379 |
mdx | v3 bag-of-models ensemble | Demucs + HDemucs | 4 (bag) | 4 | 1.3 GB | 1298 |
mdx_extra | v3 ensemble trained on extra data | HDemucs | 4 (bag) | 4 | 1.2 GB | 1516 |
mdx_q | Quantized v3 ensemble (same quality, smaller) | Demucs + HDemucs | 4 (bag) | 4 | 1.3 GB | 1298 |
mdx_extra_q | Quantized v3 extra ensemble | HDemucs | 4 (bag) | 4 | 1.2 GB | 1516 |
{model_name}.safetensors — model weights (float32){model_name}_config.json — model class, architecture config, and bag-of-models metadata1# Separate a song into stems
2demucs-mlx-swift -n htdemucs song.wav
3
4# Use a specific model
5demucs-mlx-swift -n htdemucs_ft song.wav
6
7# Two-stem mode (vocals + instrumental)
8demucs-mlx-swift -n htdemucs --two-stems vocals song.wav1import DemucsMLX
2
3let separator = try DemucsSeparator(modelName: "htdemucs")
4let result = try separator.separate(fileAt: URL(fileURLWithPath: "song.wav"))1pip install demucs-mlx
2demucs-mlx -n htdemucs song.wav1pip install demucs safetensors numpy
2
3# Export all 8 models
4python export_from_pytorch.py --out-dir ./output
5
6# Export specific models
7python export_from_pytorch.py --models htdemucs htdemucs_ft --out-dir ./outputexport_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}