/ Модель

Характеристики

Лицензия
Своя лицензия
Опубликована
26 ноя 2026

roformer-instrumental-ft

Обработка аудиоАудио → аудио3 профессии
0скачиваний за 30 дней0лайковвеса обновлены26 ноя 2026

Описание модели

Составлено на русском по карточке модели и метаданным Hugging Face

Дообученные ONNX-модели BS-Roformer и Mel-Band-Roformer отделяют вокал от музыкального микса, чтобы получить инструментал для караоке.

Это две дообученные модели разделения музыки на основе BS-Roformer и Mel-Band-Roformer, опубликованные в формате ONNX. Их назначение — извлекать вокальную дорожку из полного микса, чтобы получить инструментальную версию для караоке; инструментал вычисляется как разность между миксом и предсказанным вокалом. Для BS-Roformer доступны варианты FP32 и FP16, для Mel-Band-Roformer — FP32. Модели обрабатывают стереозвук с частотой 44,1 кГц блоками по 8 секунд; для длинных записей используется перекрытие блоков и плавное сведение.

Дообучение проведено на примерно 190 песнях, преимущественно японской поп-музыке и вокалоидных композициях, с официальными инструментальными версиями. На отложенной выборке из 16 песен BS-Roformer показал улучшение метрики SDR инструментала относительно исходной модели и меньшее просачивание вокала, но инструментал может звучать тоньше. Для Mel-Roformer отмечена примерно вдвое более высокая скорость, однако различие качества двух вариантов по этой небольшой выборке неубедительно. Лицензия указана как other; конкретные условия следует проверить у автора репозитория и базовых моделей.

Сценарии применения

  • удаление вокала из песни для караоке
  • создание инструментальной версии музыкального трека
  • извлечение вокальной дорожки из стереомикса
  • подготовка фонограммы для репетиций и выступлений

Ограничения

Результаты проверены только на 16 песнях и могут заметно зависеть от аранжировки; в отдельных случаях качество ухудшается. Инструментал может звучать тоньше исходного, а для обработки требуется стереоаудио с частотой 44,1 кГц.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Roformer Instrumental (vocal removal) fine-tunes — ONNX

Two vocal/instrumental separation models fine-tuned for getting a clean instrumental (karaoke) from a full mix, exported to ONNX in FP32 and FP16:

FileBase modelPrecisionSize
bs_roformer_inst_ft.onnxBS-Roformer, viperx edition (model_bs_roformer_ep_317_sdr_12.9755)FP32645 MB
bs_roformer_inst_ft_fp16.onnxsameFP16324 MB
mel_roformer_inst_ft.onnxMel-Band-Roformer, KimberleyJensen edition (KimberleyJSN/melbandroformer)FP32918 MB
mel_roformer_inst_ft_fp16.onnxsameFP16460 MB

The FP16 files use FP16 weights and compute, with the RMSNorm normalisation kept in FP32 (it overflows in FP16). Their input and output are still float32, so the same inference code works for both. On a GPU, FP16 gives the same quality and is the recommended choice.

Both models predict the vocal stem; the instrumental is mixture − vocals. The training loss is on the vocal stem, which for these targets is the same as the error of the instrumental (see Training).

Results

Validation set: 16 songs held out from training (no other version of the same song was used in training). Instrumental metrics are computed on mixture − predicted vocals against the reference instrumental; mean over the 16 songs. Higher is better.

ModelInst. SDRInst. SI-SDRBleedlessFullness
BS-Roformer (base)12.9312.7826.225.7
BS-Roformer (this fine-tune)13.3713.1735.021.6
Mel-Roformer (base)12.5612.3826.625.6
Mel-Roformer (this fine-tune)13.2212.9933.822.2
  • Instrumental SDR improves on 14 of 16 songs for each model.
  • The largest change is less vocal bleed in the instrumental (bleedless +8 to +9). Fullness drops by about 3.5–4, so the instrumental can sound slightly thinner than with the base models. Listen before choosing.
  • The difference between the two fine-tunes (0.16 dB) is not significant on 16 songs. The Mel-Roformer is about twice as fast.
  • The validation references are themselves obtained by subtraction (see below), so absolute numbers are lower than on clean multitrack benchmarks; compare the models against each other.

ONNX export check

Each export was compared with the PyTorch model it came from (full songs, ONNX Runtime CUDA):

PyTorch vs ONNX FP32 (one batch)Inst. SDR, song A: PyTorch / FP32 / FP16Inst. SDR, song B: FP32 / FP16
BS-Roformer−78.6 dB difference13.548 / 13.546 / 13.55813.582 / 13.582
Mel-Roformer−75.9 dB difference9.724 / 9.724 / 9.72415.162 / 15.175

Usage

pip install "onnxruntime-gpu[cuda,cudnn]" numpy soundfile   # or: pip install onnxruntime numpy soundfile  (CPU)
python infer_onnx.py --model bs_roformer_inst_ft_fp16.onnx --input song.wav --out_dir out/

Writes out/song_vocals.wav and out/song_instrumental.wav. Input must be 44.1 kHz (mono is duplicated to stereo). --batch sets how many 8 s chunks run at once (default 1; FP32 with batch 2 needs more than 16 GB of VRAM). --cpu forces CPU.

Speed for a 157 s song on an RTX 5060 Ti 16 GB (batch 1 for FP32, 2 for FP16):

FP32FP16
BS-Roformer58 s35 s
Mel-Roformer29 s19 s

ONNX interface

The graph does not contain the STFT/ISTFT; infer_onnx.py does them in NumPy.

nameshapelayout
inputspecfloat32 [B, 2050, 801, 2]stereo STFT of one chunk, frequency and channel interleaved as (freq, channel), 801 frames, real/imag
outputvocalsfloat32 [B, 2050, 801, 2]masked vocal spectrogram, same layout
  • STFT: n_fft=2048, hop=441, periodic Hann window of 2048, center=True with reflect padding (same as torch.stft).
  • Chunk: 352,800 samples (8 s at 44.1 kHz) → 801 frames. Batch size is dynamic; the frame count is fixed.
  • After the model, set the DC bin to 0, then ISTFT.
  • Long audio: chunks with 50 % overlap and a linear crossfade of 1/10 chunk, reflect-padded at the edges (as in ZFTurbo's Music-Source-Separation-Training demix).

Training

Data. About 190 publicly released songs (mainly Japanese pop and vocal-synth music) paired with their officially released instrumental (off-vocal) versions, 11.5 h in total. For each pair the vocal target is vocals = mixture − aligned instrumental, so the training stems satisfy vocals + other = mixture exactly.

Alignment. For each song/instrumental pair:

  1. coarse time offset from a 4 kHz cross-correlation, refined at full rate on several windows (clock drift between windows is measured);
  2. a per-frequency transfer function H(f) is fitted from the instrumental to the mixture (STFT 4096), to absorb small EQ/mastering differences;
  3. a broadband gain per 0.5 s block, median-filtered and limited to 0.5–2×.

Quality filtering. Many pairs are not the same master or edit (different intro/outro, extra effects, different mix). A pair was kept only if

  • the subtracted vocals agree with a pretrained vocal model's estimate (SDR ≥ 4 dB),
  • in passages the pretrained model hears as vocal-free, the subtraction residual is ≤ −10 dB relative to the mixture,
  • drift ≤ 4 samples and overlap ≥ 80 %.

203 of 427 candidate pairs passed. 16 were held out for validation (at most 2 per artist; other versions of those songs were removed from training by title and audio-fingerprint matching), 187 were used for training.

Fine-tuning (ZFTurbo Music-Source-Separation-Training):

BS-RoformerMel-Roformer
targetvocals (base head kept)vocals (base head kept)
chunk8 s8 s
batch2 per GPU × 2 GPUs × grad. accumulation 22 × grad. accumulation 3
optimizerAdam, lr 1e-5, ReduceLROnPlateau (patience 3, ×0.95)same
otherEMA 0.999, AMP, gradient checkpointingEMA 0.999, AMP
augmentationper-stem loudness 0.5–1.5, no mixupsame
steps1000 per epoch; early stop after 8 epochs without gainsame
best epoch5 (of 11)10 (of 19)
hardware2× NVIDIA L40S, ~55 min/epoch1× L40S, ~18 min/epoch

Mixup was disabled so that subtracted vocals are never mixed into a different song.

Limitations

  • Small validation set (16 songs); the BS vs Mel comparison is within noise.
  • Training targets come from subtraction, so they contain whatever differs between the released mix and the released instrumental (and lossy-encoding noise). The models learn to remove that too, which is one reason the instrumentals are leaner (lower fullness).
  • One validation song got clearly worse with the BS-Roformer fine-tune (−1.8 dB), while the rest improved; results vary by arrangement.
  • 44.1 kHz stereo only.

Licenses and credits

  • Mel-Roformer fine-tune: derived from KimberleyJSN/melbandroformer (MIT).
  • BS-Roformer fine-tune: derived from viperx's BS-Roformer ep_317 weights as distributed in the UVR model repository; check the upstream terms before redistribution or commercial use.
  • Architectures: BS-RoFormer (Lu et al., 2023) and Mel-RoFormer (Wang et al., 2023); implementation from lucidrains/BS-RoFormer via ZFTurbo/Music-Source-Separation-Training.
  • infer_onnx.py is provided under the MIT license.

中文說明

兩個去人聲(取伴奏)用的微調模型,ONNX 格式(FP32 與 FP16)。模型輸出人聲,伴奏 = 原曲 − 人聲。

  • 訓練資料:約 190 首公開發行歌曲與其官方伴奏版的配對(共 11.5 小時)。人聲目標由原曲減去對齊後的伴奏得到;對齊包含時間偏移、逐頻率響應與分段增益修正,並用預訓練模型篩掉版本不一致的配對(427 對中保留 203 對)。
  • 驗證:16 首未參與訓練的歌。伴奏 SDR:BS-Roformer 12.93 → 13.37 dB、Mel-Roformer 12.56 → 13.22 dB;人聲殘留明顯減少(bleedless +8~9),伴奏完整度略降(fullness −3.5~4)。
  • 檔案:每個模型各有 FP32 與 FP16 版本;FP16 品質相同、檔案減半、速度較快,GPU 推論建議使用 FP16。
  • 推論:pip install "onnxruntime-gpu[cuda,cudnn]" numpy soundfile,然後 python infer_onnx.py --model bs_roformer_inst_ft_fp16.onnx --input song.wav --out_dir out/(輸入需 44.1 kHz)。

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм

Нельзя запустить

Обработка «аудио → аудио» пока не поддерживается рантаймом.

Ревизия весов
6322645

0 моделей