mlx-audio-separator 0.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mlx_audio_separator-0.1.1/LICENSE +21 -0
- mlx_audio_separator-0.1.1/PKG-INFO +187 -0
- mlx_audio_separator-0.1.1/README.md +144 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/__init__.py +8 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/__main__.py +4 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/core.py +963 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/demucs_mlx/__init__.py +3 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/demucs_mlx/__main__.py +4 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/demucs_mlx/api.py +201 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/demucs_mlx/apply_mlx.py +293 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/demucs_mlx/audio.py +112 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/demucs_mlx/metal_kernels.py +722 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/demucs_mlx/mlx_backend.py +92 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/demucs_mlx/mlx_convert.py +1006 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/demucs_mlx/mlx_demucs.py +624 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/demucs_mlx/mlx_hdemucs.py +790 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/demucs_mlx/mlx_htdemucs.py +550 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/demucs_mlx/mlx_layers.py +314 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/demucs_mlx/mlx_registry.py +47 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/demucs_mlx/mlx_transformer.py +407 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/demucs_mlx/mlx_utils.py +73 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/demucs_mlx/model_converter.py +47 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/demucs_mlx/separate.py +305 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/demucs_mlx/spec_mlx.py +204 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/demucs_mlx/wiener_mlx.py +308 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/model-data.json +31 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/models-scores.json +55430 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/models.json +253 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/__init__.py +0 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/architectures/__init__.py +0 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/architectures/demucs_separator.py +147 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/architectures/mdx_separator.py +270 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/architectures/mdxc_separator.py +604 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/architectures/vr_separator.py +262 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/audio_chunking.py +113 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/common_separator.py +330 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/models/__init__.py +0 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/models/demucs/__init__.py +0 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/models/mdx/__init__.py +3 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/models/mdx/convtdfnet.py +234 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/models/mdx/loader.py +746 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/models/mdx/stft.py +117 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/models/mdxc/__init__.py +17 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/models/mdxc/loader.py +323 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/models/mdxc/tfc_tdf_v3_mlx.py +359 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/models/roformer/__init__.py +4 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/models/roformer/bs_roformer.py +1065 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/models/roformer/loader.py +342 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/models/roformer/mel_band_roformer.py +549 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/models/roformer/metal_kernels.py +93 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/models/vr/__init__.py +4 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/models/vr/layers.py +208 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/models/vr/loader.py +341 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/models/vr/modelparams/1band_sr16000_hl512.json +19 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/models/vr/modelparams/1band_sr32000_hl512.json +19 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/models/vr/modelparams/1band_sr33075_hl384.json +19 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/models/vr/modelparams/1band_sr44100_hl1024.json +19 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/models/vr/modelparams/1band_sr44100_hl256.json +19 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/models/vr/modelparams/1band_sr44100_hl512.json +19 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/models/vr/modelparams/1band_sr44100_hl512_cut.json +19 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/models/vr/modelparams/1band_sr44100_hl512_nf1024.json +19 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/models/vr/modelparams/2band_32000.json +30 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/models/vr/modelparams/2band_44100_lofi.json +30 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/models/vr/modelparams/2band_48000.json +30 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/models/vr/modelparams/3band_44100.json +42 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/models/vr/modelparams/3band_44100_mid.json +43 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/models/vr/modelparams/3band_44100_msb2.json +43 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/models/vr/modelparams/4band_44100.json +54 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/models/vr/modelparams/4band_44100_mid.json +55 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/models/vr/modelparams/4band_44100_msb.json +55 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/models/vr/modelparams/4band_44100_msb2.json +55 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/models/vr/modelparams/4band_44100_reverse.json +55 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/models/vr/modelparams/4band_44100_sw.json +55 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/models/vr/modelparams/4band_v2.json +54 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/models/vr/modelparams/4band_v2_sn.json +55 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/models/vr/modelparams/4band_v3.json +54 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/models/vr/modelparams/4band_v3_sn.json +55 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/models/vr/modelparams/4band_v4_ms_fullband.json +58 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/models/vr/modelparams/ensemble.json +43 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/models/vr/nets.py +206 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/models/vr/nets_new.py +124 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/separator/models/vr/spec_utils.py +366 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/utils/__init__.py +0 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/utils/benchmark.py +452 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/utils/cli.py +292 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/utils/equivalence.py +381 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator/utils/performance.py +216 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator.egg-info/PKG-INFO +187 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator.egg-info/SOURCES.txt +114 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator.egg-info/dependency_links.txt +1 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator.egg-info/entry_points.txt +2 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator.egg-info/requires.txt +18 -0
- mlx_audio_separator-0.1.1/mlx_audio_separator.egg-info/top_level.txt +1 -0
- mlx_audio_separator-0.1.1/pyproject.toml +88 -0
- mlx_audio_separator-0.1.1/setup.cfg +4 -0
- mlx_audio_separator-0.1.1/tests/test_apply_mlx_runtime.py +27 -0
- mlx_audio_separator-0.1.1/tests/test_benchmark.py +256 -0
- mlx_audio_separator-0.1.1/tests/test_common_separator.py +85 -0
- mlx_audio_separator-0.1.1/tests/test_core.py +134 -0
- mlx_audio_separator-0.1.1/tests/test_demucs_wiener_runtime.py +62 -0
- mlx_audio_separator-0.1.1/tests/test_docs.py +13 -0
- mlx_audio_separator-0.1.1/tests/test_equivalence_utils.py +154 -0
- mlx_audio_separator-0.1.1/tests/test_generate_reference_manifest.py +58 -0
- mlx_audio_separator-0.1.1/tests/test_loaders.py +405 -0
- mlx_audio_separator-0.1.1/tests/test_mdxc_vectorized.py +281 -0
- mlx_audio_separator-0.1.1/tests/test_mel_filters.py +84 -0
- mlx_audio_separator-0.1.1/tests/test_metal_kernels.py +155 -0
- mlx_audio_separator-0.1.1/tests/test_mlx_vs_pas_abba.py +51 -0
- mlx_audio_separator-0.1.1/tests/test_mlx_vs_pas_parity.py +77 -0
- mlx_audio_separator-0.1.1/tests/test_models.py +113 -0
- mlx_audio_separator-0.1.1/tests/test_optimization_report_helpers.py +144 -0
- mlx_audio_separator-0.1.1/tests/test_perf_trace.py +72 -0
- mlx_audio_separator-0.1.1/tests/test_performance_params.py +212 -0
- mlx_audio_separator-0.1.1/tests/test_release_readiness.py +83 -0
- mlx_audio_separator-0.1.1/tests/test_spec_mlx.py +35 -0
- mlx_audio_separator-0.1.1/tests/test_vr_spec_utils.py +96 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024-2026 ssmall256
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: mlx-audio-separator
|
|
3
|
+
Version: 0.1.1
|
|
4
|
+
Summary: MLX-native audio stem separation for Apple Silicon
|
|
5
|
+
Author: ssmall256
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/ssmall256/mlx-audio-separator
|
|
8
|
+
Project-URL: Repository, https://github.com/ssmall256/mlx-audio-separator
|
|
9
|
+
Project-URL: Issues, https://github.com/ssmall256/mlx-audio-separator/issues
|
|
10
|
+
Project-URL: Changelog, https://github.com/ssmall256/mlx-audio-separator/blob/main/CHANGELOG.md
|
|
11
|
+
Keywords: audio,music,stem-separation,source-separation,mlx,apple-silicon,vocals,instrumental,karaoke,demucs,roformer
|
|
12
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
13
|
+
Classifier: Operating System :: MacOS
|
|
14
|
+
Classifier: Development Status :: 3 - Alpha
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: Intended Audience :: Science/Research
|
|
17
|
+
Classifier: Topic :: Multimedia :: Sound/Audio
|
|
18
|
+
Classifier: Topic :: Multimedia :: Sound/Audio :: Mixers
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
+
Requires-Python: >=3.10
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
License-File: LICENSE
|
|
26
|
+
Requires-Dist: mlx>=0.30.3
|
|
27
|
+
Requires-Dist: mlx-audio-io>=1.3.1
|
|
28
|
+
Requires-Dist: mlx-spectro>=0.2.2
|
|
29
|
+
Requires-Dist: numpy>=2
|
|
30
|
+
Requires-Dist: pyyaml
|
|
31
|
+
Requires-Dist: requests>=2
|
|
32
|
+
Requires-Dist: tqdm
|
|
33
|
+
Requires-Dist: packaging
|
|
34
|
+
Provides-Extra: dev
|
|
35
|
+
Requires-Dist: pytest; extra == "dev"
|
|
36
|
+
Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
|
|
37
|
+
Requires-Dist: ruff; extra == "dev"
|
|
38
|
+
Provides-Extra: convert
|
|
39
|
+
Requires-Dist: torch>=2.3; extra == "convert"
|
|
40
|
+
Requires-Dist: onnx>=1.15; extra == "convert"
|
|
41
|
+
Requires-Dist: demucs>=4.0; extra == "convert"
|
|
42
|
+
Dynamic: license-file
|
|
43
|
+
|
|
44
|
+
# mlx-audio-separator
|
|
45
|
+
|
|
46
|
+
MLX-native stem separation for Apple Silicon Macs.
|
|
47
|
+
|
|
48
|
+
This project ports the inference paths from [python-audio-separator](https://github.com/nomadkaraoke/python-audio-separator) to MLX so separation runs on Apple Silicon without requiring PyTorch or ONNX Runtime at inference time.
|
|
49
|
+
Core runtime components are powered by [mlx-audio-io](https://github.com/ssmall256/mlx-audio-io) (audio I/O) and [mlx-spectro](https://github.com/ssmall256/mlx-spectro) (spectral transforms).
|
|
50
|
+
|
|
51
|
+
## Requirements
|
|
52
|
+
|
|
53
|
+
- macOS 13+ (Ventura or later)
|
|
54
|
+
- Apple Silicon (M1/M2/M3/M4)
|
|
55
|
+
- Python 3.10+
|
|
56
|
+
|
|
57
|
+
## Installation
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
pip install mlx-audio-separator
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
If you need first-run conversion from upstream checkpoints (`.ckpt`/`.onnx`/Demucs weights), install conversion extras:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
pip install "mlx-audio-separator[convert]"
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Quick Start
|
|
70
|
+
|
|
71
|
+
### CLI
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
# Separate with default model
|
|
75
|
+
mlx-audio-separator song.mp3
|
|
76
|
+
|
|
77
|
+
# Use a specific model
|
|
78
|
+
mlx-audio-separator song.mp3 -m htdemucs_ft.yaml
|
|
79
|
+
|
|
80
|
+
# List supported models
|
|
81
|
+
mlx-audio-separator --list_models
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Python
|
|
85
|
+
|
|
86
|
+
```python
|
|
87
|
+
from mlx_audio_separator import Separator
|
|
88
|
+
|
|
89
|
+
sep = Separator()
|
|
90
|
+
sep.load_model()
|
|
91
|
+
outputs = sep.separate("song.mp3")
|
|
92
|
+
print(outputs)
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Supported Architectures
|
|
96
|
+
|
|
97
|
+
- Roformer (BS-Roformer and MelBand-Roformer families)
|
|
98
|
+
- MDXC (including MDX23C-style checkpoints)
|
|
99
|
+
- MDX
|
|
100
|
+
- VR
|
|
101
|
+
- Demucs
|
|
102
|
+
|
|
103
|
+
## Validation Snapshot
|
|
104
|
+
|
|
105
|
+
Release validation snapshot (2026-02-24 to 2026-02-26):
|
|
106
|
+
|
|
107
|
+
| Check | Result |
|
|
108
|
+
|---|---|
|
|
109
|
+
| Full-catalog benchmark gate | 163/163 models `ok` (0 failures) |
|
|
110
|
+
| Unit tests | 167 passed, 1 skipped |
|
|
111
|
+
| MLX vs `audio-separator` parity smoke | 4/4 models passed (`rel L2 <= 5e-2`) |
|
|
112
|
+
|
|
113
|
+
Scope: Apple Silicon (`M4 mini`), MUSDB18-HQ test subset, release gate + parity smoke model set.
|
|
114
|
+
|
|
115
|
+
Detailed evidence and provenance: [`docs/release-validation.md`](docs/release-validation.md).
|
|
116
|
+
|
|
117
|
+
## Performance Snapshot
|
|
118
|
+
|
|
119
|
+
MLX vs `audio-separator` (ABBA, 12-song MUSDB18-HQ test subset, M4 mini):
|
|
120
|
+
|
|
121
|
+
| Model | MLX speedup vs PAS |
|
|
122
|
+
|---|---:|
|
|
123
|
+
| `htdemucs_ft.yaml` | 1.40x |
|
|
124
|
+
| `model_bs_roformer_ep_317_sdr_12.9755.ckpt` | 2.16x |
|
|
125
|
+
| `mel_band_roformer_instrumental_instv7n_gabox.ckpt` | 2.50x |
|
|
126
|
+
| `UVR-MDX-NET-Inst_HQ_3.onnx` | 1.53x |
|
|
127
|
+
|
|
128
|
+
Median speedup across the 4-model overlap set: **1.847x**.
|
|
129
|
+
|
|
130
|
+
These numbers are scoped to the benchmark settings above and are not universal guarantees for all machines, models, or audio inputs.
|
|
131
|
+
|
|
132
|
+
## Stable Runtime Tuning
|
|
133
|
+
|
|
134
|
+
Release-facing stable controls:
|
|
135
|
+
|
|
136
|
+
- `--speed_mode {default,latency_safe,latency_safe_v2}`
|
|
137
|
+
- `--cache_clear_policy {aggressive,deferred}`
|
|
138
|
+
- `--write_workers <int>`
|
|
139
|
+
|
|
140
|
+
Example:
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
mlx-audio-separator song.mp3 \
|
|
144
|
+
--speed_mode latency_safe \
|
|
145
|
+
--cache_clear_policy deferred \
|
|
146
|
+
--write_workers 2
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Basic benchmark command:
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
mlx-audio-separator \
|
|
153
|
+
--benchmark song.mp3 \
|
|
154
|
+
--benchmark_warmup 1 \
|
|
155
|
+
--benchmark_repeats 3 \
|
|
156
|
+
--benchmark_profile
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## Documentation
|
|
160
|
+
|
|
161
|
+
| Document | Description |
|
|
162
|
+
|---|---|
|
|
163
|
+
| [`docs/release-validation.md`](docs/release-validation.md) | Release evidence snapshot |
|
|
164
|
+
| [`docs/release-first.md`](docs/release-first.md) | Release execution playbook |
|
|
165
|
+
| [`docs/reproducibility.md`](docs/reproducibility.md) | Reproducibility guide |
|
|
166
|
+
| [`docs/wave4-opt-in.md`](docs/wave4-opt-in.md) | Wave 4 opt-in/experimental roadmap |
|
|
167
|
+
| [`CHANGELOG.md`](CHANGELOG.md) | Changelog |
|
|
168
|
+
| [`THIRD_PARTY_NOTICES.md`](THIRD_PARTY_NOTICES.md) | Third-party attribution and license notices |
|
|
169
|
+
|
|
170
|
+
## License
|
|
171
|
+
|
|
172
|
+
This project is MIT licensed.
|
|
173
|
+
|
|
174
|
+
## Acknowledgments
|
|
175
|
+
|
|
176
|
+
`mlx-audio-separator` is derived from [python-audio-separator](https://github.com/nomadkaraoke/python-audio-separator) (MIT) by [beveradb](https://github.com/beveradb) and the [nomadkaraoke](https://github.com/nomadkaraoke) community. Substantial portions of the architecture, model loading, and separation logic are adapted from that project. If you find this package useful, please also star and support the upstream project.
|
|
177
|
+
|
|
178
|
+
The models used by this project were trained by the [Ultimate Vocal Remover](https://github.com/Anjok07/ultimatevocalremovergui) community, primarily [@Anjok07](https://github.com/Anjok07) and [@aufr33](https://github.com/aufr33). See [`THIRD_PARTY_NOTICES.md`](THIRD_PARTY_NOTICES.md) for full attribution and license details.
|
|
179
|
+
|
|
180
|
+
Additional references:
|
|
181
|
+
|
|
182
|
+
- [mlx-audio-io](https://github.com/ssmall256/mlx-audio-io)
|
|
183
|
+
- [mlx-spectro](https://github.com/ssmall256/mlx-spectro)
|
|
184
|
+
- [BS-Roformer](https://arxiv.org/abs/2309.02612)
|
|
185
|
+
- [Demucs (Meta Research)](https://github.com/facebookresearch/demucs)
|
|
186
|
+
- [Ultimate Vocal Remover](https://github.com/Anjok07/ultimatevocalremovergui)
|
|
187
|
+
- [python-audio-separator](https://github.com/nomadkaraoke/python-audio-separator)
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# mlx-audio-separator
|
|
2
|
+
|
|
3
|
+
MLX-native stem separation for Apple Silicon Macs.
|
|
4
|
+
|
|
5
|
+
This project ports the inference paths from [python-audio-separator](https://github.com/nomadkaraoke/python-audio-separator) to MLX so separation runs on Apple Silicon without requiring PyTorch or ONNX Runtime at inference time.
|
|
6
|
+
Core runtime components are powered by [mlx-audio-io](https://github.com/ssmall256/mlx-audio-io) (audio I/O) and [mlx-spectro](https://github.com/ssmall256/mlx-spectro) (spectral transforms).
|
|
7
|
+
|
|
8
|
+
## Requirements
|
|
9
|
+
|
|
10
|
+
- macOS 13+ (Ventura or later)
|
|
11
|
+
- Apple Silicon (M1/M2/M3/M4)
|
|
12
|
+
- Python 3.10+
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
pip install mlx-audio-separator
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
If you need first-run conversion from upstream checkpoints (`.ckpt`/`.onnx`/Demucs weights), install conversion extras:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
pip install "mlx-audio-separator[convert]"
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Quick Start
|
|
27
|
+
|
|
28
|
+
### CLI
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
# Separate with default model
|
|
32
|
+
mlx-audio-separator song.mp3
|
|
33
|
+
|
|
34
|
+
# Use a specific model
|
|
35
|
+
mlx-audio-separator song.mp3 -m htdemucs_ft.yaml
|
|
36
|
+
|
|
37
|
+
# List supported models
|
|
38
|
+
mlx-audio-separator --list_models
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Python
|
|
42
|
+
|
|
43
|
+
```python
|
|
44
|
+
from mlx_audio_separator import Separator
|
|
45
|
+
|
|
46
|
+
sep = Separator()
|
|
47
|
+
sep.load_model()
|
|
48
|
+
outputs = sep.separate("song.mp3")
|
|
49
|
+
print(outputs)
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Supported Architectures
|
|
53
|
+
|
|
54
|
+
- Roformer (BS-Roformer and MelBand-Roformer families)
|
|
55
|
+
- MDXC (including MDX23C-style checkpoints)
|
|
56
|
+
- MDX
|
|
57
|
+
- VR
|
|
58
|
+
- Demucs
|
|
59
|
+
|
|
60
|
+
## Validation Snapshot
|
|
61
|
+
|
|
62
|
+
Release validation snapshot (2026-02-24 to 2026-02-26):
|
|
63
|
+
|
|
64
|
+
| Check | Result |
|
|
65
|
+
|---|---|
|
|
66
|
+
| Full-catalog benchmark gate | 163/163 models `ok` (0 failures) |
|
|
67
|
+
| Unit tests | 167 passed, 1 skipped |
|
|
68
|
+
| MLX vs `audio-separator` parity smoke | 4/4 models passed (`rel L2 <= 5e-2`) |
|
|
69
|
+
|
|
70
|
+
Scope: Apple Silicon (`M4 mini`), MUSDB18-HQ test subset, release gate + parity smoke model set.
|
|
71
|
+
|
|
72
|
+
Detailed evidence and provenance: [`docs/release-validation.md`](docs/release-validation.md).
|
|
73
|
+
|
|
74
|
+
## Performance Snapshot
|
|
75
|
+
|
|
76
|
+
MLX vs `audio-separator` (ABBA, 12-song MUSDB18-HQ test subset, M4 mini):
|
|
77
|
+
|
|
78
|
+
| Model | MLX speedup vs PAS |
|
|
79
|
+
|---|---:|
|
|
80
|
+
| `htdemucs_ft.yaml` | 1.40x |
|
|
81
|
+
| `model_bs_roformer_ep_317_sdr_12.9755.ckpt` | 2.16x |
|
|
82
|
+
| `mel_band_roformer_instrumental_instv7n_gabox.ckpt` | 2.50x |
|
|
83
|
+
| `UVR-MDX-NET-Inst_HQ_3.onnx` | 1.53x |
|
|
84
|
+
|
|
85
|
+
Median speedup across the 4-model overlap set: **1.847x**.
|
|
86
|
+
|
|
87
|
+
These numbers are scoped to the benchmark settings above and are not universal guarantees for all machines, models, or audio inputs.
|
|
88
|
+
|
|
89
|
+
## Stable Runtime Tuning
|
|
90
|
+
|
|
91
|
+
Release-facing stable controls:
|
|
92
|
+
|
|
93
|
+
- `--speed_mode {default,latency_safe,latency_safe_v2}`
|
|
94
|
+
- `--cache_clear_policy {aggressive,deferred}`
|
|
95
|
+
- `--write_workers <int>`
|
|
96
|
+
|
|
97
|
+
Example:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
mlx-audio-separator song.mp3 \
|
|
101
|
+
--speed_mode latency_safe \
|
|
102
|
+
--cache_clear_policy deferred \
|
|
103
|
+
--write_workers 2
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Basic benchmark command:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
mlx-audio-separator \
|
|
110
|
+
--benchmark song.mp3 \
|
|
111
|
+
--benchmark_warmup 1 \
|
|
112
|
+
--benchmark_repeats 3 \
|
|
113
|
+
--benchmark_profile
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Documentation
|
|
117
|
+
|
|
118
|
+
| Document | Description |
|
|
119
|
+
|---|---|
|
|
120
|
+
| [`docs/release-validation.md`](docs/release-validation.md) | Release evidence snapshot |
|
|
121
|
+
| [`docs/release-first.md`](docs/release-first.md) | Release execution playbook |
|
|
122
|
+
| [`docs/reproducibility.md`](docs/reproducibility.md) | Reproducibility guide |
|
|
123
|
+
| [`docs/wave4-opt-in.md`](docs/wave4-opt-in.md) | Wave 4 opt-in/experimental roadmap |
|
|
124
|
+
| [`CHANGELOG.md`](CHANGELOG.md) | Changelog |
|
|
125
|
+
| [`THIRD_PARTY_NOTICES.md`](THIRD_PARTY_NOTICES.md) | Third-party attribution and license notices |
|
|
126
|
+
|
|
127
|
+
## License
|
|
128
|
+
|
|
129
|
+
This project is MIT licensed.
|
|
130
|
+
|
|
131
|
+
## Acknowledgments
|
|
132
|
+
|
|
133
|
+
`mlx-audio-separator` is derived from [python-audio-separator](https://github.com/nomadkaraoke/python-audio-separator) (MIT) by [beveradb](https://github.com/beveradb) and the [nomadkaraoke](https://github.com/nomadkaraoke) community. Substantial portions of the architecture, model loading, and separation logic are adapted from that project. If you find this package useful, please also star and support the upstream project.
|
|
134
|
+
|
|
135
|
+
The models used by this project were trained by the [Ultimate Vocal Remover](https://github.com/Anjok07/ultimatevocalremovergui) community, primarily [@Anjok07](https://github.com/Anjok07) and [@aufr33](https://github.com/aufr33). See [`THIRD_PARTY_NOTICES.md`](THIRD_PARTY_NOTICES.md) for full attribution and license details.
|
|
136
|
+
|
|
137
|
+
Additional references:
|
|
138
|
+
|
|
139
|
+
- [mlx-audio-io](https://github.com/ssmall256/mlx-audio-io)
|
|
140
|
+
- [mlx-spectro](https://github.com/ssmall256/mlx-spectro)
|
|
141
|
+
- [BS-Roformer](https://arxiv.org/abs/2309.02612)
|
|
142
|
+
- [Demucs (Meta Research)](https://github.com/facebookresearch/demucs)
|
|
143
|
+
- [Ultimate Vocal Remover](https://github.com/Anjok07/ultimatevocalremovergui)
|
|
144
|
+
- [python-audio-separator](https://github.com/nomadkaraoke/python-audio-separator)
|