Mini-BS-RoFormer V2 (46.8M) β Core ML
HiDolen/Mini-BS-RoFormer-V2-46.8M (2025 Band-Split RoPE Transformer with dual-resolution STFT, 4-stem music source separation) for Core ML on Apple devices. CC-BY-NC-4.0 (non-commercial) β for commercial use, see the MIT-licensed 18M or HTDemucs Core ML ports in this org.
Converted from the same verified reference used by the schism-mlx MLX ports. Two variants per model:
| File | Precision | Compute units | chunk residual |
|---|---|---|---|
BSRoformerV2_Core_fp16.mlpackage |
FLOAT16 | ALL (ANE) | β72.9 dB |
BSRoformerV2_Core_fp32.mlpackage |
FLOAT32 | CPU+GPU | β132.7 dB |
Verified on-device-equivalently via coremltools on an M5 Max, against the reference implementation on real audio. fp16 is ANE-eligible and recommended for iPhone / iPad; fp32 is the tight-parity fallback.
Download
.mlpackage bundles must be materialized as real files β the Core ML
compiler rejects the symlinks that a default snapshot_download creates in
the Hugging Face cache:
from huggingface_hub import snapshot_download
path = snapshot_download("schism-audio/mini-bs-roformer-v2-coreml", local_dir="./mini-bs-roformer-v2-coreml")
(or hf download schism-audio/mini-bs-roformer-v2-coreml --local-dir ./mini-bs-roformer-v2-coreml). Swift hosts
downloading files directly are unaffected.
I/O contract
- input
spec:(1, 690, 8196)float32 β merged analysis STFT of one 8 s / 352800-sample chunk: n_fft 4096, hop 512, hann, unnormalized, layout(C, 2049, 690)complex β(690, 2049*2*2)with frequency outer, channel, re/im innermost - output
mask:(1, 4, 690, 4100)float32 β per-stem complex mask at the synthesis resolution (F=1025); unmerge β complex, multiply with a second STFT of the same chunk at n_fft 2048 (same hop/window), iSTFT (n_fft 2048, hop 512, unnormalized) β stems β the host runs two STFTs per chunk - full tracks: 8 s / 352800-sample chunks, 50% overlap, linear fade window (fade = chunk/10), fold-normalized overlap-add (see
separate()in schism-mlxbs_roformer/model.py) - stem order is bass / drums / other / vocals β not the Demucs order
DSP frontend (host-side)
The Core ML graph contains the network only. The host implements the audio
frontend and must match schism_mlx.audio numerically β
test_vectors_*.npz in this repo holds deterministic input/output pairs
(float32; match within ~1e-4 relative to be interchangeable with what these
models were verified against). test_vectors_pipeline.npz additionally pins the full-track orchestration around the model call (chunk grid, blending, normalization) via a deterministic mock model β scaled-down sizes, same algorithm, generated by the shipped schism-mlx separate() / windowing code. test_vectors_integration.npz goes one step further: a full synthetic track plus the verified reference output, for end-to-end host validation (the schism-dsp integration tests run the published fp32 core through it). A validated Swift
implementation (Accelerate; modules SchismDSP and SchismPipeline) is
available at
schism-audio/schism-dsp,
tested against these exact vectors.
License
CC-BY-NC-4.0, inherited from the source weights (weights cast bf16 β fp32/fp16 at conversion). Model by HiDolen; Core ML conversion by schism-audio.
- Downloads last month
- 26