A simple Windows GUI for AI Music Stem Separation (Demucs) built with CustomTkinter.
- Offline CPU Execution: Uses
demucs(htdemucs) for processing without requiring a GPU or internet connection for inference (after model download). - Model Selection: Choose between
htdemucs(Default) andmdx(Extra) models. - High Quality Mode: Enable
shifts=2for better separation quality (processed slightly slower). - Karaoke Mode: Automatic 2-stem output merging stems into 'Vocals' vs 'Backing'.
- WAV Export: Saves separated stems directly as WAV files using
soundfile. - Dark Mode GUI: Clean and modern interface powered by
customtkinter. - Threaded Processing: Keeps the UI responsive during separation.
- Python 3.10+
- FFmpeg:
ffmpeg.exeandffprobe.exemust be present in the root directory.
-
Clone the repository:
git clone https://github.com/DQ-Labs/Rend.git cd Rend -
Create and activate a virtual environment:
python -m venv venv .\venv\Scripts\activate
-
Install dependencies using the automated setup script:
.\setup_dev.ps1
This script patches the local Demucs copy for Windows compatibility and installs all requirements.
Run the application:
python app.py- Select an input audio file.
- The stems will be saved in the output directory (default:
separated/or similar relative path).
- Local Demucs Source: The project relies on a local copy of the
demucslibrary located in thedemucs_sourcefolder. This requires an editable install (pip install -e .) to function correctly with custom modifications. - Dependency Management: Critical dependencies like
torchandsoundfilemust be compatible with the system Python version (Python 3.11/3.12 recommended).
To create a standalone EXE file using PyInstaller:
-
Requirements:
- Ensure
ffmpeg.exeandffprobe.exeare in the root directory. - Activate your virtual environment.
- Ensure
-
Build Command: Run the following command to build the executable using the pre-configured spec file:
pyinstaller Rend.spec --clean --noconfirm
Make sure to run this via your virtual environment's Python (e.g.,
.\venv\Scripts\python.exe -m PyInstaller ...) if you have multiple Python versions installed.The
Rend.specfile is configured to:- Include
demucs_sourcein the path and data bundle. - Bundle
ffmpeg.exeandffprobe.exebinaries. - Handle hidden imports for
demucsandsoundfile. - Create a single-file executable (
dist/Rend.exe).
- Include
- Launch Time: The final
.exetakes approximately 30 seconds to launch. This is normal behavior for a PyInstaller "one-file" build as it unpacks temporary files to a runtime directory. - First Run: On the very first separation, the application will automatically download the necessary AI models. This requires an internet connection and may take some time depending on your speed. Subsequent runs will be offline.
- Troubleshooting: If you previously encountered NumPy errors during packaging, these have been addressed in the latest build spec (v1.1+).