Hybrid Transformers for Music Source Separation
Paper • 2211.08553 • Published • 1
How to use mlx-community/htdemucs-ft-vocals-mlx with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] huggingface-cli download --local-dir htdemucs-ft-vocals-mlx mlx-community/htdemucs-ft-vocals-mlx
The vocal branch of Meta's HTDemucs v4 (htdemucs_ft) converted to MLX format for native
inference on Apple Silicon, consumed by the xocialize/demucs-mlx-swift
Swift port. Refer to the original Demucs repository
for details on the model.
htdemucs_ft (fine-tuned), vocal branchvocals (derive instrumental as mixture - vocals)htdemucs_ft_vocals.safetensors — the MLX weights (fp16).import SwiftDemucs
import Hub
let dir = try await HubApi().snapshot(from: "mlx-community/htdemucs-ft-vocals-mlx")
let separator = try await VocalSeparator(weightsDirectory: dir)
let vocals = try await separator.separate(samples: mixture) // [1, 2, N] @ 44.1 kHz
MIT — both the Demucs model weights (Meta) and the MLX port code are MIT-licensed.
Quantized