BS-RoFormer SW 6-stem — GGUF Q8_0
A Q8_0 GGUF conversion of the BS-RoFormer SW 6-stem music source separation model by jarredou, for C++ inference with BSRoformer.cpp / Fork-BSRoformer.cpp.
The GGUF file is the native separation engine of Stemway, a desktop app for separating songs into stems.
This repository has no new training. The weights are the original jarredou checkpoint, converted to GGUF and quantized to 8 bits.
Stems
The model returns 6 stems, in this order:
| Index | Stem |
|---|---|
| 0 | bass |
| 1 | drums |
| 2 | other |
| 3 | vocals |
| 4 | guitar |
| 5 | piano |
The model has a single vocals output that holds lead vocals and backing vocals together. To split them, run a karaoke model (lead vs. backing) on the vocals stem.
File
| File | Format | Size |
|---|---|---|
bs-roformer-multi-q8.gguf |
GGUF v3, Q8_0 (file_type = 7) |
~188 MB |
Architecture
Band-Split RoFormer (Lu et al., 2023), in the lucidrains/BS-RoFormer implementation used by ZFTurbo/Music-Source-Separation-Training.
These values were read from the GGUF metadata:
| Parameter | Value |
|---|---|
| Parameters | 174,657,268 |
dim / depth |
256 / 12 |
heads / dim_head |
8 / 64 |
time_transformer_depth / freq_transformer_depth |
1 / 1 |
mask_estimator_depth |
2 |
num_bands |
62 |
num_stems |
6 |
| Stereo | yes |
| Sample rate | 44,100 Hz |
| STFT | n_fft 2048, hop 512, window 2048 |
| Default chunk size | 588,800 samples (~13.35 s) |
| Default overlap | 2 |
Usage
Input requirements
The CLI expects a stereo WAV at 44.1 kHz. Convert other formats or sample rates first, for example:
ffmpeg -i song.mp3 -ac 2 -ar 44100 song.wav
CLI
Download a bs_roformer-cli build from the BSRoformer.cpp releases or the Fork-BSRoformer.cpp releases. Builds exist for CPU, CUDA and Vulkan.
./bs_roformer-cli bs-roformer-multi-q8.gguf song.wav output.wav --overlap 2
For multi-stem models, the CLI writes one file per stem, using the index from the table above:
output_stem_0.wav # bass
output_stem_1.wav # drums
output_stem_2.wav # other
output_stem_3.wav # vocals
output_stem_4.wav # guitar
output_stem_5.wav # piano
Tips:
- Use a higher
--overlapfor better quality at the cost of speed. - Set
BSR_FORCE_CPU=1to force CPU inference even when a GPU backend is available.
Conversion
The model was converted with scripts/convert_to_gguf.py from BSRoformer.cpp, using the original checkpoint and its training config.yaml. The config lists instruments: [bass, drums, other, vocals, guitar, piano].
python scripts/convert_to_gguf.py --ckpt <bs_roformer_sw.ckpt> --config <config.yaml> --out bs-roformer-multi-q8.gguf --dtype q8_0
Q8_0 quantization is near-lossless for this architecture. Small numerical differences from the original FP32 PyTorch model are still expected.
License and credits
- Model and weights: BS-RoFormer SW 6-stem by jarredou. jarredou's Hugging Face account no longer exists. A restored copy is at Blakus/bs_roformer_sw_6stem, published under MIT. This repository uses the same license. If you are the original author and want different terms or attribution, please open a discussion.
- Architecture: Band-Split RoFormer by Wei-Tsung Lu, Ju-Chiang Wang, Qiuqiang Kong and Yun-Ning Hung (arXiv:2309.02612). Implementation by lucidrains.
- Training framework: ZFTurbo/Music-Source-Separation-Training.
- Inference engine and converter: chenmozhijin/BSRoformer.cpp, built on ggml. Fork: victorlfdev/Fork-BSRoformer.cpp.
The training data and its licenses are those of the original model, not this conversion. Check them before any commercial use of the separated audio.