demucs
Music source separation in the waveform domain.
What it is and what it does
Demucs is a music source separation model that breaks a single audio track into isolated stems—drums, bass, vocals, and other accompaniment. Version 4 uses a hybrid transformer architecture that processes both waveform and spectrogram representations simultaneously, achieving state-of-the-art separation quality (9.0 dB SDR on the MUSDB HQ test set). The model was trained on MUSDB HQ plus 800 additional songs.
You invoke it via command-line or Python API to process MP3, WAV, or other audio formats. It outputs separate audio files for each stem. The package includes multiple model variants: htdemucs_ft (fine-tuned, recommended), htdemucs (baseline), hdemucs_mmi (retrained), and an experimental 6-source model. Separation runs on CPU or GPU; GPU is significantly faster but not required.
Use it for:
- Extract vocals from a song for karaoke or vocal-focused remixing workflows.
- Isolate drum and bass tracks for beat analysis, re-arrangement, or music production.
- Create instrumental versions by removing vocals for background music or licensing.
- Prepare training data for music information retrieval or other audio ML tasks.
- Analyze song composition by examining separated stems independently.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Demucs separates music into individual stems—drums, bass, vocals, and accompaniment—using a hybrid transformer-based neural network trained on waveform and spectrogram domains.
Yes. Demucs is actively maintained, has no known vulnerabilities, low install friction, and permissive licensing. It delivers state-of-the-art stem separation out of the box. Install if you need to separate music into drums, bass, vocals, or other stems; skip if you only need metadata extraction or don't work with audio.
Install
demucs on PyPI
pip
pip install demucsuv
uv add demucspoetry
poetry add demucsInstalling demucs
Before you install
Low friction: pure Python wheel with no compiled dependencies beyond torch. Actively maintained as of July 2026 with recent updates. Requires Python 3.10+.
License in practice
MIT License permits commercial and private use with minimal restrictions; you may use, modify, and distribute Demucs freely provided you include the license notice.
Quickstart
pip install demucs
python3 -m demucs -n htdemucs_ft path/to/song.mp3
# Outputs separated stems to ./separated/htdemucs_ft/song/
Requires Python 3.10+. torch installation may require system CUDA/GPU drivers if GPU acceleration is desired; CPU-only inference is supported but slower.
Verify before relying
- Actual inference speed and memory requirements for typical song lengths on CPU vs. GPU hardware.
- Quality degradation or artifacts when separating non-Western music genres or atypical instrumentation.
- Whether the 6-source model (adding guitar and piano) has improved since the acknowledged piano source artifacts mentioned in the description.
Package facts
| License | MIT License (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 10 — einops, huggingface-hub, julius, lameenc, numpy, pyyaml, safetensors, sphn, torch, tqdm |
| Maintenance | actively maintained — 34 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 400,505/month — #6,939 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: demucs-4.1.0-py3-none-any.whl
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
audio-separatorSeparates audio files into multiple stems…
permissive · top 15,000 on PyPI
openunmixSeparates music into individual stems (vocals,…
permissive · top 15,000 on PyPI
torchaudioProvides PyTorch-based audio processing,…
permissive · top 5,000 on PyPI
encodecEnCodec is a neural audio codec that compresses…
noncommercial · top 15,000 on PyPI
GammatoneApplies banks of gammatone filters to audio…
unclear · top 15,000 on PyPI
aubioaubio is a Python wrapper around a C library…
copyleft · top 15,000 on PyPI
snacSNAC compresses audio into discrete…
unclear · top 15,000 on PyPI
spotdlspotDL downloads songs from Spotify playlists…
permissive · top 15,000 on PyPI
noisereduceReduces noise in audio and time-domain signals…
permissive · top 15,000 on PyPI