MDX23C InstVoc HQ as a float16 Core AI asset
Browse files
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
stems-mdx23c-instvoc-float16.aimodel/main.mlirb filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
pipeline_tag: audio-to-audio
|
| 4 |
+
tags:
|
| 5 |
+
- source-separation
|
| 6 |
+
- vocal-separation
|
| 7 |
+
- mdx23c
|
| 8 |
+
- core-ai
|
| 9 |
+
- apple-silicon
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# MDX23C InstVoc HQ — Core AI (float16)
|
| 13 |
+
|
| 14 |
+
Vocal / instrumental separation for Apple silicon: **MDX23C-8KFFT-InstVoc_HQ**
|
| 15 |
+
converted to a Core AI asset (`stems-mdx23c-instvoc-float16.aimodel`, 214 MB) for
|
| 16 |
+
on-device use from Swift.
|
| 17 |
+
|
| 18 |
+
## Credit
|
| 19 |
+
|
| 20 |
+
- **Architecture:** TFC-TDF-UNet v3 (MDX23C) — Kim & Lee.
|
| 21 |
+
- **Implementation:** [ZFTurbo/Music-Source-Separation-Training](https://github.com/ZFTurbo/Music-Source-Separation-Training) (MIT).
|
| 22 |
+
- **Weights:** `MDX23C-8KFFT-InstVoc_HQ` from [Ultimate Vocal Remover](https://github.com/Anjok07/ultimatevocalremovergui)'s public model repository (MIT).
|
| 23 |
+
|
| 24 |
+
This repository only converts those weights; all credit for the model belongs to them.
|
| 25 |
+
|
| 26 |
+
## What the asset computes
|
| 27 |
+
|
| 28 |
+
The network between the spectrogram and the stem spectrograms — the STFT, chunking and
|
| 29 |
+
inverse STFT run in the host:
|
| 30 |
+
|
| 31 |
+
- input `spec` `[1, 4, 4096, 256]` float32 — left re, left im, right re, right im; bins 0–4095
|
| 32 |
+
of an STFT with n_fft 8192, hop 1024, periodic Hann, centred; one chunk is 261,120 samples
|
| 33 |
+
at 44.1 kHz.
|
| 34 |
+
- output `stems` `[1, 8, 4096, 256]` float32 — vocals (4 channels), then instrumental.
|
| 35 |
+
|
| 36 |
+
Weights and arithmetic are float16 behind float32 input and output.
|
| 37 |
+
|
| 38 |
+
## Measured (macOS 27, Apple silicon)
|
| 39 |
+
|
| 40 |
+
| | this asset | float32 export | 8-bit Core ML package |
|
| 41 |
+
|---|---|---|---|
|
| 42 |
+
| one chunk vs PyTorch float32 | 62.6 dB | 123.9 dB | 35.3 dB |
|
| 43 |
+
| time per chunk (GPU) | 0.27 s | 0.31 s | 0.74 s |
|
| 44 |
+
| a 30 s mix, end to end | 3.0 s | 3.5 s | 6.9 s |
|
| 45 |
+
|
| 46 |
+
On three 30-second mixes with a known vocal, all three scored the same vocal and
|
| 47 |
+
instrumental SDR to within 0.01 dB. Repeated runs are bit-for-bit identical. The export
|
| 48 |
+
asserts the converted network equals upstream's `model(chunk)` exactly before saving.
|
| 49 |
+
|
| 50 |
+
## Use
|
| 51 |
+
|
| 52 |
+
With [`stems`](https://github.com/arraypress), which fetches this on first use:
|
| 53 |
+
|
| 54 |
+
```sh
|
| 55 |
+
stems song.mp3 # song-vocal.wav + song-instrumental.wav
|
| 56 |
+
```
|
| 57 |
+
|
| 58 |
+
From Swift, with [swift-vocal-isolation](https://github.com/arraypress/swift-vocal-isolation):
|
| 59 |
+
|
| 60 |
+
```swift
|
| 61 |
+
let separator = try await MDXSeparator(contentsOf: assetURL)
|
| 62 |
+
let stems = try await separator.separate(contentsOf: songURL)
|
| 63 |
+
```
|
| 64 |
+
|
| 65 |
+
Converted with `Tools/export_mdx.py --precision float16` in swift-vocal-isolation.
|
stems-mdx23c-instvoc-float16.aimodel/main.hash
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
(R��"�����Z�T���c?�N�P��;A��
|
stems-mdx23c-instvoc-float16.aimodel/main.mlirb
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2852bce622b386cec1c85acf165491088bf48a633fff4e8850bec13b41f505fc
|
| 3 |
+
size 224073232
|
stems-mdx23c-instvoc-float16.aimodel/metadata.json
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"creationDate" : "20261010T143633Z",
|
| 3 |
+
"author" : "Kim & Lee — TFC-TDF-UNet v3 (MDX23C); implementation ZFTurbo (MIT); weights UVR MDX23C-8KFFT-InstVoc_HQ (MIT); Core AI export by VocalIsolation",
|
| 4 |
+
"producer" : "coreai-core 1.0.0b2",
|
| 5 |
+
"license" : "MIT",
|
| 6 |
+
"description" : "MDX23C vocals\/instrumental: spec [1,4,4096,256] (L re, L im, R re, R im; n_fft 8192, hop 1024, 261,120 samples) → stems [1,8,4096,256] (vocals ×4, instrumental ×4). STFT, chunking and iSTFT in the host.",
|
| 7 |
+
"assetVersion" : "2.0"
|
| 8 |
+
}
|