Skip to content
ModelListedExternal
Browse files

Demucs Mlx FP16

Float16 MLX-compatible weights for all 8 pretrained Demucs models, converted to safetensors format for inference on Apple Silicon.

KindOtherBase modeladefossez/demucsVersionRevision b4704beUnratedgrade

Model source

Kind
Other
File size
52.4–659 MB
Base model
adefossez/demucs
Version
vRevision b4704be
Updated
Nov 3, 2026
Downloads
0
Source
Hugging Face

Source description

Demucs — MLX (float16)

Float16 MLX-compatible weights for all 8 pretrained Demucs models, converted to safetensors format for inference on Apple Silicon.

This is the float16 variant of iky1e/demucs-mlx — same models, half the file size, identical output quality. Recommended for Apple Silicon where memory is constrained (iOS, smaller Macs).

Demucs is a music source separation model that splits audio into stems: drums, bass, other, vocals (and guitar, piano for 6-source models).

Models

ModelWhat it isArchitectureSub-modelsSourcesWeights (fp16)Weights (fp32)
htdemucsDefault v4 model, best speed/quality balanceHTDemucs (v4)1480 MB160 MB
htdemucs_ftFine-tuned v4, best overall qualityHTDemucs (v4)4 (fine-tuned)4321 MB641 MB
htdemucs_6s6-source v4 (adds guitar + piano stems)HTDemucs (v4)1652 MB105 MB
hdemucs_mmiv3 hybrid, trained on more dataHDemucs (v3)14160 MB319 MB
mdxv3 bag-of-models ensembleDemucs + HDemucs4 (bag)4659 MB1.3 GB
mdx_extrav3 ensemble trained on extra dataHDemucs4 (bag)4638 MB1.2 GB
mdx_qQuantized v3 ensemble (same quality, smaller)Demucs + HDemucs4 (bag)4659 MB1.3 GB
mdx_extra_qQuantized v3 extra ensembleHDemucs4 (bag)4638 MB1.2 GB

All models output stereo audio at 44.1 kHz.

Float16 vs Float32

Output quality is identical — max sample difference is 3.1e-5 (one int16 LSB), correlation > 0.999999999. MLX on Apple Silicon upcasts float16 weights to float32 for computation, so the math is the same.

Metricfloat32 (iky1e/demucs-mlx)float16 (this repo)
htdemucs file size160 MB80 MB
htdemucs RSS (peak memory)1311 MB1210 MB
htdemucs speed (M1 Pro)7.1s7.9s
Output qualityreferenceidentical

Origin

Files

Each model consists of two files at the repo root:

  • {model_name}.safetensors — model weights (float16)
  • {model_name}_config.json — model class, architecture config, and bag-of-models metadata

Usage

Swift (demucs-mlx-swift)

Point the model directory or repo to this float16 variant:

# Use float16 models from local directory
demucs-mlx-swift -n htdemucs --model-dir /path/to/demucs-mlx-fp16 song.wav

# Or set the HF repo environment variable
export DEMUCS_MLX_SWIFT_MODEL_REPO=iky1e/demucs-mlx-fp16
demucs-mlx-swift -n htdemucs song.wav

Or use the Swift API directly:

import DemucsMLX

let separator = try DemucsSeparator(modelName: "htdemucs")
let result = try separator.separate(fileAt: URL(fileURLWithPath: "song.wav"))

Converting from PyTorch

To reproduce the export directly from PyTorch Demucs checkpoints:

pip install demucs safetensors numpy

# Export all 8 models as float16 (default)
python export_from_pytorch.py --out-dir ./output

# Export as float32
python export_from_pytorch.py --out-dir ./output --dtype float32

The conversion script (export_from_pytorch.py) is available in the demucs-mlx-swift repo under scripts/.

Citation

@inproceedings{rouard2022hybrid,
  title={Hybrid Transformers for Music Source Separation},
  author={Rouard, Simon and Massa, Francisco and Defossez, Alexandre},
  booktitle={ICASSP 23},
  year={2023}
}

@inproceedings{defossez2021hybrid,
  title={Hybrid Spectrogram and Waveform Source Separation},
  author={Defossez, Alexandre},
  booktitle={Proceedings of the ISMIR 2021 Workshop on Music Source Separation},
  year={2021}
}

Sources

1 source
Hugging FacePrimaryVersion b4704be3fc825ab7b247d549a3df9b0db1a6addf
huggingface.co/iky1e/demucs-mlx-fp16/tree/b4704be3fc825ab7b247d549a3df9b0db1a6addf

Verified Nov 3

Download files

Model artifacts

8 artifacts

hdemucs_mmi.safetensors

safetensors · FP16 (unverified) · 160 MB · SHA-256 296eba7d60dd…4568 · Hugging Face

Download file

htdemucs_6s.safetensors

safetensors · 52.4 MB · SHA-256 91bf1175c95f…6299 · Hugging Face

Download file

htdemucs_ft.safetensors

safetensors · 321 MB · SHA-256 6eb655cf7290…5a89 · Hugging Face

Download file

htdemucs.safetensors

safetensors · FP16 (unverified) · 80.1 MB · SHA-256 fc770cfcd06c…3f92 · Hugging Face

Download file

mdx_extra_q.safetensors

safetensors · 638 MB · SHA-256 a9c0ef032296…d827 · Hugging Face

Download file

mdx_extra.safetensors

safetensors · 638 MB · SHA-256 40c4a84c16b2…463e · Hugging Face

Download file

mdx_q.safetensors

safetensors · 659 MB · SHA-256 151f7b3917ae…8c6c · Hugging Face

Download file

mdx.safetensors

safetensors · 659 MB · SHA-256 6fe9bf1d699f…a33e · Hugging Face

Download file

Source excerpts

2 excerpts

--- license: mit library_name: mlx tags: - mlx - audio - music-source-separation - source-separation - demucs - htdemucs - hdemucs - apple-silicon - float16 base_model: adefossez/demucs pipeline_tag: audio-to-audio --- # Demucs — MLX (float16) Float16 MLX-compatible weights for all 8 pretrained [Demucs](https://github.com/adefossez/demucs) models, converted to `safetensors` format for inference on Apple Silicon. This is the **float16 variant** of [iky1e/demucs-mlx](https://huggingface.co/iky1e/demucs-mlx) — same models, half the file size, identical output quality. Recommended for Apple Silicon where memory is constrained (iOS, smaller Macs). Demucs is a music source separation model that splits audio into stems: `drums`, `bass`, `other`, `vocals` (and `guitar`, `piano` for 6-source models). ## 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 | All models output stereo audio at 44.1 kHz. ## Float16 vs Float32 Output quality is **identical** — max sample difference is 3.1e-5 (one int16 LSB), correlation > 0.999999999. MLX on Apple Silicon upcasts float16 weights to float32 for computation, so the math is the same. | Metric | float32 ([iky1e/demucs-mlx](https://huggingface.co/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 | iden...

Source context: 0 downloads · 0 likes · Pipeline audio-to-audio · Library mlx · Repo iky1e/demucs-mlx-fp16