Registry / ai-ml / openunmix

openunmix

JSON →
library1.3.0pypypi✓ verified 22d ago

Open-Unmix is a PyTorch-based music source separation toolkit that provides pre-trained models and a flexible framework for separating audio into its constituent parts (vocals, drums, bass, other). The current version is 1.3.0, and the library is actively maintained with regular updates addressing bug fixes, performance improvements, and new model releases.

pip install openunmix
INSTALL
IMPORT
SIG · OPENUNMIX
O
openunmix
ai-mlpythonv1.3.0
Install
67.8s avg
Import
Disk
4813MB
Pass rate
4/ 10
Env Coverage4 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.3.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✕ build_error
✓ 78s
py 3.11
✕ build_error
✓ 70.1s
py 3.12
✕ build_error
✓ 63.6s
py 3.13
✕ build_error
✓ 59.7s
py 3.9
✕ build_error
✕ timeout
4813MB installed
● package 4813MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

separate_audio
from openunmix import separate_audio
from openunmix import separate_audio

This quickstart demonstrates how to use the `separate_audio` function to perform music source separation. It simulates loading a stereo audio signal and outputs a dictionary of separated stems, each as a PyTorch tensor. The `umxl` model is used by default for inference from version 1.2.1 onwards.

import torch import numpy as np from openunmix.separate import separate_audio # Simulate stereo audio data (e.g., 10 seconds at 44.1 kHz) sr = 44100 duration = 10 # seconds num_frames = sr * duration # Create a dummy audio tensor: (channels, samples) # In a real scenario, load an audio file using torchaudio.load() or similar. audio_data_np = np.random.randn(2, num_frames).astype(np.float32) audio_tensor = torch.from_numpy(audio_data_np) # Separate the audio into stems # By default, 'umxl' model is used from v1.2.1 onwards estimates = separate_audio(audio_tensor, rate=sr) # 'estimates' is a dictionary with keys like 'vocals', 'drums', 'bass', 'other' # Each value is a torch.Tensor representing the separated stem. print("Separated stems and their shapes:") for stem_name, stem_tensor in estimates.items(): print(f" {stem_name}: {stem_tensor.shape}") # Example: access vocals vocals = estimates['vocals'] # print(f"Vocals stem shape: {vocals.shape}")
umx --version
Debug
Known issues
breakingStarting from v1.2.1, the `umxl` model became the new default for inference (both CLI and Python API), potentially changing results compared to previous versions that defaulted to `umxhq`. Additionally, the training argument `--model` was renamed to `--checkpoint`.
fix
To use the previous default, explicitly specify `model_name='umxhq'` when calling separation functions or using the CLI. Update training scripts to use the `--checkpoint` argument instead of `--model`.
affects: >=1.2.1
breakingSupport for `torchaudio <0.7.0` was dropped in Open-Unmix v1.1.1. Using older versions of `torchaudio` will result in compatibility errors.
fix
Ensure your `torchaudio` installation is version 0.7.0 or newer. Upgrade using `pip install --upgrade torchaudio`.
affects: >=1.1.1
gotchaThe `umxl` model, introduced in v1.2.0 and made default in v1.2.1, is only licensed for non-commercial applications. Users must comply with its specific license terms.
fix
Review the license terms associated with the `umxl` model. For commercial applications, consider using the `umxhq` model or other alternatives, explicitly specifying them during separation.
affects: >=1.2.0
gotchaPython 3.6 support was removed in v1.3.0. The library now requires Python 3.9 or newer.
fix
Upgrade your Python environment to version 3.9 or higher to use Open-Unmix v1.3.0 and later.
affects: >=1.3.0
gotchaFixes for broken Zenodo URLs were implemented in v1.3.0. Users of older versions might encounter issues when trying to download pre-trained models, as the URLs could be invalid or change.
fix
For reliable model downloads, it is recommended to use Open-Unmix v1.3.0 or later. If using older versions and encountering download issues, manually verify the Zenodo model URLs or upgrade.
affects: <1.3.0
Upgrade
Version history
1.3.0latest on PyPI · released Apr 16, 2024
Audit
Dependencies
torchrequiredCore deep learning framework dependency.
torchaudiorequiredRequired for audio loading, processing, and saving.
numpyrequiredGeneral numerical computing.
stempegrequiredUsed for loading and saving multi-track audio files.
ffmpeg-pythonrequiredPythonic wrapper for FFmpeg, used for audio processing.
tqdmrequiredProvides progress bars, essential for CLI and long-running operations.
Agent activity
9 hits · last 30 days
node
8
Resources