An updated continuation of Demucs for source separation using torchcodec instead of torchaudio.
Project description
Demucs-Torchcodec
Demucs-Torchcodec is a modernized fork of the Original Demucs.
While the original repository is no longer actively maintained, this fork continues the project by replacing the deprecated torchaudio decoding backends with the high-performance torchcodec library.
Why use this fork?
- Modern Backend: Uses
torchcodecfor faster and more robust audio decoding. - Dependency Lean: Removes reliance on older
torchaudioversions that often conflict with modern PyTorch installations. - Future Proof: Designed to work with Python 3.10+ and the latest PyTorch ecosystems.
Installation
1. Requirements
Before installing, ensure you have FFmpeg installed on your system (required by torchcodec):
- Ubuntu/Debian:
sudo apt-get install ffmpeg - macOS:
brew install ffmpeg - Windows:
choco install ffmpeg(or download from ffmpeg.org)
2. Install the Package
pip install -U demucs-torchcodec
Usage
The entry point for this version is demucs-torchcodec.
# Basic separation (defaults to htdemucs)
demucs-torchcodec test.mp3
# Separate into 2 stems (vocals and accompaniment)
demucs-torchcodec --two-stems=vocals test.mp3
# Use the high-quality fine-tuned model
demucs-torchcodec -n htdemucs_ft test.mp3
Supported Models
This fork supports all standard Demucs v4 models, including:
htdemucs: Hybrid Transformer Demucs (Default).htdemucs_ft: Fine-tuned version (Higher quality, slower).hdemucs_mmi: Hybrid Demucs v3 retrained.mdx_extra: Trained with extra data.
Credits & License
Original Author: Alexandre Défossez.
This project is licensed under the MIT License , exactly like the original Demucs. See the LICENSE file for details.
If you use this model in your research, please cite the original paper:
@inproceedings{rouard2022hybrid,
title={Hybrid Transformers for Music Source Separation},
author={Rouard, Simon and Massa, Francisco and D{\'e}fossez, Alexandre},
booktitle={ICASSP 23},
year={2023}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file demucs_torchcodec-0.1.0.tar.gz.
File metadata
- Download URL: demucs_torchcodec-0.1.0.tar.gz
- Upload date:
- Size: 854.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
674789221915a67d4c54dc15cb0c3cf7112451f809984475a054016035cd378b
|
|
| MD5 |
0474699a7a344804b476cc0625575877
|
|
| BLAKE2b-256 |
686fede438010896e1c291b62be6080656727411239bebdf79d6c5b893cc54fe
|
File details
Details for the file demucs_torchcodec-0.1.0-py3-none-any.whl.
File metadata
- Download URL: demucs_torchcodec-0.1.0-py3-none-any.whl
- Upload date:
- Size: 66.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c845311522b1c6c8b258de026e8ca36d9d4ad6c2cfc19eae3f4ff4ce6c32e709
|
|
| MD5 |
48efeca0517382c5f42107ce4844d02d
|
|
| BLAKE2b-256 |
eea6d1c35e566592113b77a7fde54c2d148e0e2bba49afd0d72dc1435838e049
|