So you want a vocal remover AI that runs locally, doesn’t upload your files to a stranger’s server, and doesn’t cost $10/month. The answer is Demucs. The catch: which Demucs?
That question is the whole reason this guide exists. Search results are full of tutorials pointing at repositories that haven’t been touched in over a year, install commands that quietly break on modern PyTorch, and “just run pip install demucs” advice that produces cryptic errors on fresh Windows machines. Let’s sort that out.
What you’re actually installing (and from where)
Demucs is Meta AI’s music source separation model. Demucs v4 landed on PyPI on December 7, 2022, with htdemucs as the default model – and that’s still the current stable branch as of this writing. Version numbers haven’t moved because the project’s maintenance status is complicated.
Here’s the part most tutorials skip: the original facebookresearch/demucs repo notes that its author no longer works at Meta and points readers to a fork at github.com/adefossez/demucs. Both repos publish the same demucs package to PyPI. For plain vocal removal, either works. If you’re on modern PyTorch 2.x and hitting dependency hell, there’s also demucs-infer, an inference-only fork with PyTorch 2.x compatibility and no torchaudio<2.1 restriction.
Pick your poison. This guide uses the official demucs package because it’s what the docs describe. I’ll flag when to jump ship.
System requirements for the vocal remover AI
Demucs runs on PyTorch, so platform requirements largely follow PyTorch’s own. One note: the cells below reflect what the official docs specify – OS version minimums aren’t listed in the Demucs README itself, so check PyTorch’s system requirements page for your platform before assuming compatibility.
| Component | Minimum | Notes |
|---|---|---|
| Python | 3.10 | Per official PyPI page; 3.9 will not work |
| GPU VRAM (optional) | 3 GB NVIDIA | ~7 GB needed with default arguments |
| FFmpeg | Any recent build | Must be on PATH for MP3/M4A inputs |
| torchaudio (Windows GPU) | ≤ 2.1 | Hard ceiling – newer versions break Demucs on Windows |
The official PyPI page states you’ll need at least Python 3.10. If you’re on 3.9, don’t try to force it – install a newer Python before touching Demucs.
GPU is optional but a real multiplier on long sessions. The README specifies at least 3 GB of GPU RAM, but about 7 GB is needed with default arguments. Below 3 GB, use CPU. On CPU, processing time runs roughly 1.5 times the track’s duration. A 4-minute song: about 6 minutes. Fine for one track, painful for a full album.
Install Demucs step by step
Three commands if nothing goes wrong. It rarely goes wrong on Linux and macOS. Windows is where people get stuck.
1. Create a virtual environment
# macOS / Linux
python3 -m venv demucs-env
source demucs-env/bin/activate
# Windows (from Anaconda prompt or PowerShell)
python -m venv demucs-env
demucs-envScriptsactivate
Skip this and you’ll regret it. Demucs pulls in a specific torchaudio version that will fight everything else in your global Python.
2. Install FFmpeg
Demucs uses FFmpeg to decode MP3, M4A, and most non-WAV inputs. macOS: brew install ffmpeg. Ubuntu: sudo apt install ffmpeg. Windows: grab a build from the official FFmpeg site and add it to your PATH. Skip this, and MP3 inputs will throw an audioread error – and you’ll blame Demucs.
3. Install Demucs itself
pip install -U demucs
Per the PyPI page, pip install demucs comes with everything needed for separation – no separate model download step, no extra config.
4. GPU users only – the torchaudio trap
This is where Windows users burn an afternoon. The official Windows docs warn that torchaudio must not exceed version 2.1 when using GPU acceleration. The current default torchaudio is well past that. Left alone, pip installs a version Demucs can’t talk to.
pip uninstall torch torchaudio
pip install torch==2.1.2 torchaudio==2.1.2 --index-url https://download.pytorch.org/whl/cu118
If that constraint annoys you, this is where demucs-infer becomes attractive – it drops the ceiling entirely.
First run and verification
No config file, no API key, no dashboard. Just:
# Confirm it installed
demucs --help
# Separate one track (4 stems: vocals, drums, bass, other)
demucs "my_song.mp3"
# Vocal remover mode - just vocals + instrumental
demucs --two-stems=vocals "my_song.mp3"
The first run downloads model weights (size varies by model). Output lands in ./separated/htdemucs/my_song/. Four WAV files there? You’re done.
htdemucs_ft is a fine-tuned version where separation takes 4 times as long but may produce slightly better results (per the official README). Run
demucs -n htdemucs_ft song.mp3when quality matters more than speed. For bulk work, stick with the default.
Common errors, real fixes
CUDA out of memory
Number one complaint – variations appear across multiple GitHub issues. Three escalating fixes:
demucs --segment 8 song.mp3– the –segment flag changes the size of each split; with only 3 GB memory, setting it to 8 reduces peak usage, though quality may suffer if set too small.PYTORCH_NO_CUDA_MEMORY_CACHING=1 demucs song.mp3– this environment variable lets even 2 GB GPUs run separation, at the cost of slower processing. Almost no tutorial mentions this one.demucs -d cpu song.mp3– give up on GPU. Slow but reliable.
AssertionError in hdemucs.py
Set --segment too aggressively on certain tracks and the process crashes mid-run with an assertion error. This is a known bug tracked in GitHub issue #374 – it surfaces when –segment is set too low, and removing the flag entirely avoids it. Workaround: raise the segment value or drop the flag.
“is neither a single pre-trained model or a bag of models”
Mistyped model name after -n. Valid names: htdemucs, htdemucs_ft, htdemucs_6s. The 6-source variant adds piano and guitar as stems, but piano quality is flagged as limited in the official README.
MP3 fails to decode
Almost always FFmpeg missing from PATH. Run ffmpeg -version in the same terminal. If that fails, Demucs will too.
Upgrade and uninstall
The official Windows docs specify: python.exe -m pip install -U demucs, run from the Anaconda prompt. On Linux/macOS, drop the .exe:
pip install -U demucs
To uninstall cleanly:
pip uninstall demucs
# Delete the model cache (Linux/macOS)
rm -rf ~/.cache/torch/hub/checkpoints
# Delete the virtual environment
rm -rf demucs-env
The model cache is the sneaky one. The downloaded weights stay on disk after pip uninstall unless you clear the torch hub folder yourself.
Which Demucs should you actually run in 2026?
Here’s the honest answer nobody gives you. Occasional vocal removal from songs? Install the official demucs package, pin torchaudio to 2.1, done. Building a service or embedding Demucs in an app where modern PyTorch matters? Look at demucs-infer or demucs-torchcodec. Want a GUI? Demucs-GUI wraps the same models with a Qt interface.
The project is MIT licensed, so all of these are legitimate options for personal or commercial use.
Frequently asked questions
Is Demucs really better than Spleeter or online vocal removers?
For dense mixes or vocals with heavy effects, Demucs v4 with htdemucs_ft tends to produce cleaner separations than Spleeter, which the community broadly considers unmaintained as of this writing. For clean pop, the gap is narrower. Online removers are fine for one-offs but you’re uploading the file – that’s the tradeoff.
Can I run Demucs without a GPU at all?
Yes. Add -d cpu to any command. Done.
Why does my output sound weirdly quiet or slightly distorted after separation?
Demucs auto-rescales stems to prevent clipping, which shifts relative volume between vocals and instrumental. If you plan to mix stems back together, this matters – users report that adjusting the input file’s level a few dB before separation helps. For pure karaoke extraction (keeping just the instrumental), you probably won’t notice. One workaround reported in the community: try hard-clipping output instead of the default rescale behavior, though this may vary by version.
Open a terminal, activate that venv, run demucs --two-stems=vocals on the noisiest song you own. If it survives that, it’ll survive anything.