Demucs for MLX

MLX weights for all eight Demucs music source separation models, for use on Apple silicon with:

Provenance

These files were converted by ssmall256 from Meta's official Demucs checkpoints using the demucs-mlx converter (python -m demucs_mlx.mlx_convert <model>). The converter loads each official checkpoint with PyTorch's restricted weights_only loader, checks it against the Demucs registry's checksums, and writes safetensors — no pickle files are produced or needed.

Every member of every model was compared against its PyTorch source on the same input before release; agreement is between 75 and 120 dB signal-to-noise. The tensors are float32. Converting again with demucs-mlx reproduces these files byte for byte, so you can check them yourself against the digests below.

Models

Model Description Stems Members Size SHA-256 of .safetensors
htdemucs Hybrid Transformer Demucs (default) 4 1 160 MB 339d267a7a6983a11eedbdc00413c602a65e9b9103f695fb5c2b2a481cd9d297
htdemucs_ft Fine-tuned HTDemucs, one specialist per stem 4 4 641 MB 53f03b1ad4b4d211025a35da65460ba61a17547adf9c0544cad0ebcc8d7bbabb
htdemucs_6s HTDemucs with piano and guitar 6 1 105 MB d298f7f746bf53c21baad44fb08e88807ef47feb551dd22f1601a546c85b8e02
hdemucs_mmi Hybrid Demucs v3 4 1 319 MB 39f359110433930c2a589131f84c03c26bbd209e89e10e6abbcb6062c131debc
mdx MDX challenge track A bag 4 4 1,318 MB c95dab261c766fc50caadcd047aa2c125759b9b48efdac3f2aaab0fa35d8c41f
mdx_q mdx from the DiffQ-quantized checkpoints 4 4 1,318 MB d7f31edb6b37b5ee391d104e1f88cb70c56ca82e3f6f9e8f4f3cd2df6e9bddfc
mdx_extra MDX challenge track B bag 4 4 1,276 MB d1c969aa0a69417e767b23f97d10df944a4c9883febe853ab6d91ad0cb2276fe
mdx_extra_q mdx_extra from the DiffQ-quantized checkpoints 4 4 1,276 MB 82310bf4d1f32b8044cba6c192af77ab8d12a0acdedd7bf841caa78a61bd5839

Four-stem models produce drums, bass, other and vocals; htdemucs_6s adds guitar and piano. The _q names identify the original quantized checkpoints; the weights here are ordinary float32.

Each model is two files: <model>.safetensors and <model>_config.json. The config (format version 1) records the model classes and constructor arguments, ensemble weights, the official checkpoint signatures, and the SHA-256 of the weights. Both loaders verify that digest before building a model. This two-file layout is the shared cache format: demucs-mlx keeps it in ~/.cache/demucs-mlx (or DEMUCS_MLX_CACHE_DIR), and other tools can read the same directory instead of storing a second copy.

Use

To download one model, or everything, into a directory yourself:

hf download ssmall256/demucs-mlx htdemucs.safetensors htdemucs_config.json --local-dir ~/.cache/demucs-mlx
hf download ssmall256/demucs-mlx --local-dir ~/.cache/demucs-mlx

Python — demucs-mlx downloads the model it needs on first use and checks it against these digests, so there is nothing to fetch by hand:

pip install demucs-mlx
demucs-mlx song.wav

Swift — in demucs-mlx-swift, Separator.load() downloads and verifies the model on first use, and shares the same cache directory:

let separator = try await Separator.load()
let result = try await DemucsAudio.separate(songURL, using: separator)
try DemucsAudio.export(result, to: outputDirectory)

License and credit

MIT, the same license as Demucs. The models were trained by Alexandre Défossez and collaborators at Meta AI Research:

  • Défossez, Hybrid Spectrogram and Waveform Source Separation, 2021.
  • Rouard, Massa, Défossez, Hybrid Transformers for Music Source Separation, ICASSP 2023.

The MLX conversion, the demucs-mlx converter and both inference implementations are by ssmall256.

Downloads last month

-

Downloads are not tracked for this model. How to track
MLX
Hardware compatibility
Log In to add your hardware

Quantized

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support