Demucs banner

Machine Learning in Linux: Demucs – music source separation

With the availability of huge amounts of data for research and powerful machines to run your code on with distributed cloud computing and parallelism across GPU cores, Deep Learning has helped to create self-driving cars, intelligent voice assistants, pioneer medical advancements, machine translation, and much more. Deep Learning has become an indispensable tool for countless industries.

This series looks at highly promising machine learning and deep learning software for Linux.

Demucs is billed as “a state-of-the-art music source separation model, currently capable of separating drums, bass, and vocals from the rest of the accompaniment”. It’s based on a U-Net convolutional architecture inspired by Wave-U-Net. Version 4 features Hybrid Transformer Demucs, a hybrid spectrogram/waveform separation model using Transformers. It sounds impressive, but what are the results like?

The machine learning framework behind Demucs is PyTorch.


The project recommends that if you only want to use Demucs to separate tracks, you can install it with

$ python3 -m pip install -U demucs

To avoid polluting your system, we recommend installing demucs with Anaconda, a distribution of the Python and R programming languages for scientific computing, that aims to simplify package management and deployment.

Download and install Anaconda using wget.

$ wget

Run the shell script:

$ bash

You’ll be asked to accept Anaconda’s license and whether to initialize Anaconda3 by running conda init. For changes to take effect, close and re-open your current shell.

Create a conda environment, and activate it.

$ conda create --name demucs
$ conda activate demucs

Now we install demucs into our conda environment with the command:

$ python3 -m pip install -U demucs

There is also a Docker image definition ready for using Demucs. This installation method also ensures all libraries are correctly installed without interfering with the host operating system.

Next page: Page 2 – In Operation and Summary

Pages in this article:
Page 1 – Introduction and Installation
Page 2 – In Operation and Summary
Page 3 – Help Message

Share your Thoughts

This site uses Akismet to reduce spam. Learn how your comment data is processed.