Skip to content

Filter stemsplit RoFormer

Phillippe Pelzer edited this page Nov 15, 2026 · 3 revisions

stemsplit with RoFormer

This page covers the RoFormer engines of the stemsplit filter. They are available since v1.0.45 (stemsplit 1.1.0). They add two transformer architectures next to Spleeter: Mel-Band RoFormer and BS-RoFormer. The models are the four that StemForge's "Full" presets use.

The filter, the stems and the output pads are the same as for Spleeter. Every Spleeter command line keeps working.

Spleeter or RoFormer

Spleeter RoFormer, preset=full
Vocals, median SDR on ten held-out tracks 7.70 dB 13.37 dB
Instrumental, median SDR on the same tracks 11.72 dB 17.14 dB
Model files one, 39 MB four, 639 MB to 913 MB each, 3.38 GB together
Memory about 194 MiB the filter asks for 4.63 GB and refuses to run on a machine with less than twice that
Speed on a CPU 7 to 9 times real time one minute of audio takes 41 to 43 minutes at 8 threads (measured on a shared Xeon E5-2680 v4; other CPUs differ)
GPU opt in with use_gpu=1 automatic since stemsplit 2.0.0

The quality numbers were measured by the stemsplit project. Speed was measured on one machine only. A slower machine gives the same stems, later.

The presets

NoMercy's own software uses preset=full, vocal_full or instrumental_full with every other option at its default. ffmpeg -h filter=stemsplit lists the architectures, the presets and the file names a binary supports.

A preset takes four files by name from model_dir. Empty model_dir is the working directory. Only the models a stem needs are loaded. preset=full:stem=vocals runs two models, not four.

Preset Vocals stem Accompaniment stem
vocal_full Revive 3e + becruily vocals, max the complement of each of those two models' vocals, max
instrumental_full the complement of each of the two instrumental models, max v1e+ + becruily instrumental, max
full Revive 3e + becruily vocals, max v1e+ + becruily instrumental, max

The complement of a model is the input minus the model's target. The complement of an instrumental model is its vocals.

Examples

# Only the vocals (two models run)
ffmpeg -i song.flac -af "stemsplit=preset=full:stem=vocals" vocals.flac

# The files somewhere else
ffmpeg -i song.flac -af "stemsplit=preset=full:stem=vocals:model_dir=/srv/stemsplit-models" vocals.flac

# One RoFormer model through model=; the other stem is the input minus it
ffmpeg -i song.flac -af "stemsplit=stem=vocals:model=roformer-mel-vocals-becruily-f32.gguf" vocals.flac

# Your own combination: 2 to 4 files separated by |, combined for both stems
ffmpeg -i song.flac -af "stemsplit=stem=vocals:models=roformer-bs-vocals-revive3e-unwa-f32.gguf|roformer-mel-vocals-becruily-f32.gguf:ensemble=max" vocals.flac

# Different models per stem
ffmpeg -i song.flac -filter_complex "[0:a]stemsplit=vocals_models=roformer-bs-vocals-revive3e-unwa-f32.gguf|roformer-mel-vocals-becruily-f32.gguf:vocals_ensemble=max:accompaniment_models=roformer-mel-inst-v1e-plus-unwa-f32.gguf[voc][acc]" \
  -map "[voc]" vocals.flac -map "[acc]" instrumental.flac

One model source per run

A run takes its models from exactly one of these:

  • model: one file. Spleeter, or one RoFormer model.
  • models: 2 to 4 RoFormer files for both stems.
  • preset.
  • vocals_models and accompaniment_models: 1 to 4 files per stem.

No source, or two sources, is refused when the filter is created. A Spleeter file in a list is refused. model_dir is only for presets. A file found under a preset's name must be the architecture its name says and must predict the stem the preset needs it for. Otherwise the run is refused.

Combination modes

ensemble sets how the models of a list are combined. vocals_ensemble and accompaniment_ensemble override it per stem. Their default same means as ensemble. A preset defines its own mode (max), so a mode given together with a preset is refused.

Mode What it does
auto (default) avg for a list, max for a preset.
avg The weighted mean of the waveforms. weights= gives one positive weight per model, in list order. A count that does not match is refused.
max Per STFT bin, the value with the largest magnitude. A tie goes to the first model in the list.
min Per STFT bin, the value with the smallest magnitude.
median Per STFT bin, the median of the real parts and of the imaginary parts.

The option table is on Filter-stemsplit.

Memory

Before it reads any weights, the filter adds up what the run will hold. If that is more than half of the machine's physical memory, the run is refused. The error names both numbers. On Linux a container's memory limit counts as the machine's memory.

Preset The filter asks for The machine needs
full 4.63 GB 9.26 GB
instrumental_full 2.78 GB 5.56 GB
vocal_full 2.51 GB 5.02 GB

Measured peak private memory for preset=full is about 4.2 GiB.

Loading the four models takes 22 to 39 s on the Xeon above. A single model cannot emit a stem before it has seen one 11.0 s chunk. Real-time use is not a goal.

GPU

use_gpu=auto is the default. RoFormer goes to a Vulkan GPU when all of these hold:

  • the device is a real GPU, not a software rasteriser;
  • it wins one calibration against the CPU;
  • it passes a self-check against the CPU's mask on every model (85 dB SNR on 32 frames);
  • it can hold the work.

Anything else leaves that model on the CPU, with a warning and the CPU's bytes.

# RoFormer on the GPU when one takes it, the CPU otherwise (the default)
ffmpeg -i song.flac -filter_complex "[0:a]stemsplit=preset=full[voc][acc]" -map "[voc]" vocals.flac -map "[acc]" instrumental.flac

# RoFormer only on a GPU: a machine without one gets an error, not an hour on the CPU
ffmpeg -i song.flac -filter_complex "[0:a]stemsplit=preset=full:cpu_fallback=0[voc][acc]" -map "[voc]" vocals.flac -map "[acc]" instrumental.flac

# The CPU run, byte for byte
ffmpeg -i song.flac -filter_complex "[0:a]stemsplit=preset=full:use_gpu=0[voc][acc]" -map "[voc]" vocals.flac -map "[acc]" instrumental.flac

The stemsplit project measured preset=full on an RTX 3070 at 65 seconds of work for 60 seconds of music. Its CPU, a different machine from the Xeon above, needed about 54 minutes per minute of music. The four models were 108.8 to 124.9 dB from the CPU result.

The process-wide F32 setting and its effect on whisper are described on Filter-stemsplit. More is on GPU-Acceleration.

The four models

All four are on nomercy-stemsplit-models v2026.10.31. They are 32-bit float GGUF files. Every file has a .sha256 sidecar. manifest.json lists them all and manifest.json.sig signs it (the models release; FFmpeg releases ship no signature).

File Model Author Network Target Size SHA-256 of the file
roformer-bs-vocals-revive3e-unwa-f32.gguf Revive 3e unwa BS-RoFormer vocals 639.1 MB 1bc531052441ce07f9ad76ac23adff70afda1629b9b2caad13f7c649e1925041
roformer-mel-vocals-becruily-f32.gguf becruily vocals becruily Mel-Band RoFormer vocals 912.9 MB b4d992a61b084a732e0030e40145a381a7a23e9fcf6dceb79b00a6ae4669d414
roformer-mel-inst-v1e-plus-unwa-f32.gguf v1e+ unwa Mel-Band RoFormer instrumental 912.9 MB 7b6fa3355cd58f91502901480e8b027cd05cc25d02ef434e7fa25ce965249d18
roformer-mel-inst-becruily-f32.gguf becruily instrumental becruily Mel-Band RoFormer instrumental 912.9 MB c76f5337691d8c2bb5dc277474c52bb28910cc9b44f45811055774a88874f768

NoMercy did not make these models. Their authors had published no licence for them when they were retrieved. The release has a notice file that records who made each model and where it comes from. It is not a licence.

The notice file records each model's own digest, a hash over every weight and setting. It is not the file hash above.

A file name never changes meaning. New weights get a new file name. A model that does not change keeps its file and its SHA-256 in every later release.

Release gates

On every platform the CI runner can execute, the smoke job runs the filter's own test suite with tiny RoFormer models. It needs 20 clean exits out of 20. It also checks that Spleeter stems are byte-identical with the previous release.

Clone this wiki locally