bs-roformer-sw-onnx-vocals
A vocal ONNX extractor with quantization
2 min read
This model is a specialized version of the BS-RoFormer SW-Fixed vocal channel architecture (44.1 kHz stereo), rewritten for onnxruntime to run on a CPU. Unnecessary tools were removed from the graph, making the file up to 12 times smaller than the original and speeding up inference. The model outputs a clean vocal track and is released in several precision variants, including quantized int8 versions. This tool will be useful for musicians, sound engineers, and audio application developers looking for high-quality track separation.
Key features
- Reduced size: from 58 to 211 MB depending on the variant (3.4 to 12.2 times smaller than the 6-stem version).
- CPU support: runs via onnxruntime without requiring a dedicated graphics card.
- Various formats: fp32, int8wo (weights-only), and dynamic int8 variants are available.
- High quality: the model successfully passes rigorous correlation tests (corr > 0.999) compared to the base GGUF CLI.
What you can do
- Extract clean vocals from a musical composition using a Python script or CLI utility.
- Integrate a vocal splitter into your own local audio processing pipelines.
- Compare speed and accuracy between int8dyn_pc (for fast inference) and int8wo_b32 (for maximum fidelity to the original).
Example
import soundfile as sf
from bsroformer_sw_onnx import Splitter
splitter = Splitter(
repo_id="remy-st/bs-roformer-sw-onnx-vocals",
filename="bs_roformer_sw6_vocals_int8dyn_pc.onnx",
num_stems=1,
stem_names=("vocals",),
)
mix, sr = sf.read("song.wav")
vocals = splitter.separate(mix)["vocals"]
sf.write("vocals.wav", vocals, sr)
Read more
Details• Model weights: from 58.2 MB (int8dyn) to 211 MB (fp32).
• Metrics: int8wo_b32 shows a Pearson correlation of 0.9999892 on long audio clips.
• Requirements: onnxruntime, numpy, soundfile, CPU execution.
• Limitations: original weight licensing is officially undefined; recommended for non-commercial or private use.










Comments