skillfed

demucs

Music source separation in the waveform domain.

demucs v4.1.0 400.5K downloads/30d#6,939 on PyPI3,028
Permissive license MIT License Active released

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 demucs

uv

uv add demucs

poetry

poetry add demucs

Installing 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

License :: OSI Approved :: MIT LicenseTopic :: Multimedia :: Sound/AudioTopic :: Scientific/Engineering :: Artificial Intelligence

Tags

music source separationstem extraction audioseparate drums bass vocalsaudio demixing neural networkwaveform spectrogram separationmusic decomposition modelisolate instruments from song
audio-processingmusic-analysisneural-networks

More Artificial Intelligence packages