BS-RoFormer 4-stem, Core ML

BS-RoFormer (Lu et al., 2023) music source separation into drums, bass, other, vocals, converted to a Core ML ML Program (fp16 weights, macOS 14+). STFT and iSTFT stay outside the model.

Origin and licence

  • Weights: model_bs_roformer_ep_17_sdr_9.6568.ckpt from ZFTurbo/Music-Source-Separation-Training release v1.0.12 (MIT), SHA-256 3e9daecd70aaed5b5a0d1f861cc4d77eaa45afb3fc6301b1cf32c1be0f5868fb, configuration config_bs_roformer_384_8_2_485100.yaml.
  • Architecture as in lucidrains/BS-RoFormer (MIT).
  • Converted with coremltools 9.0 from a re-implementation of the network that loads the checkpoint tensors only; the result was checked against an independent ONNX export of the same weights (silverdaw/bs-roformer-rhythm-onnx).
  • The weights were trained by ZFTurbo; as far as is known, the training data include MUSDB18-HQ, whose terms are research-oriented. Check this against your use.

This repository redistributes the converted weights under the same MIT licence.

Interface

Name Shape Meaning
spec_real, spec_imag (in) float32 [1, 2, 1025, 801] stereo STFT of 8 s at 44.1 kHz
out_spec_real, out_spec_imag (out) float32 [1, 4, 2, 1025, 801] masked spectra: drums, bass, other, vocals

STFT as torch.stft: n_fft 2048, hop 441, periodic Hann window, center=True, reflect padding. Process longer audio in 8-s windows with overlap-add.

Speed

One 8-s window takes about 0.57 s with MLComputeUnitsCPUAndGPU on an Apple M6 (a 3-minute track in under 40 s with half-overlapping windows). Compiling for the Neural Engine took over half an hour and was not used.

Downloads last month
19
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Paper for gaschka/bs-roformer-4stem-coreml