Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
M

Music-Source-Separation-Training

> 编程语言
Open source

Repository for training models for music source separation.

1.5K stars0 likes0 views
WebsiteGitHub

About

Repository for training models for music source separation.

Music Source Separation Universal Training Code

Repository for training models for music source separation. Repository is based on kuielab code for SDX23 challenge. The main idea of this repository is to create training code, which is easy to modify for experiments. Brought to you by MVSep.com.

Models

Model can be chosen with --model_type arg.

Available models for training:

  • MDX23C based on KUIELab TFC TDF v3 architecture. Key: mdx23c.
  • Demucs4HT [Paper]. Key: htdemucs.
  • VitLarge23 based on Segmentation Models Pytorch. Key: segm_models.
  • TorchSeg based on TorchSeg module. Key: torchseg.
  • Band Split RoFormer [Paper, Repository] . Key: bs_roformer.
  • Mel-Band RoFormer [Paper, Repository]. Key: mel_band_roformer.
  • Swin Upernet [Paper] Key: swin_upernet.
  • BandIt Plus [Paper, Repository] Key: bandit.
  • SCNet [Paper, Official Repository, Unofficial Repository] Key: scnet.
  • BandIt v2 [Paper, Repository] Key: bandit_v2.
  • Apollo [Paper, Repository] Key: apollo.
  • BSMamba2 [Paper, Repository] Key: bs_mamba2.
  • Conformer [Paper, Repository] Key: conformer.
  • DTTNet [Paper, Repository] Key: dttnet.
  • BS Conformer Key: bs_conformer
  • SCNet Tran Key: scnet_tran.
  • SCNet Masked Key: scnet_masked.
  1. Note 1: For segm_models there are many different encoders is possible. Look here.
  2. Note 2: Thanks to @lucidrains for recreating the RoFormer models based on papers.
  3. Note 3: For torchseg gives access to more than 800 encoders from timm module. It's similar to segm_models.

How to: Train

To train model you need to:

  1. Choose model type with option --model_type, including: mdx23c, htdemucs, segm_models, mel_band_roformer, bs_roformer.
  2. Choose location of config for model --config_path <config path>. You can find examples of configs in configs folder. Prefixes config_musdb18_ are examples for MUSDB18 dataset.
  3. If you have a check-point from the same model or from another similar model you can use it with option: --start_check_point <weights path>
  4. Choose path where to store results of training --results_path <results folder path>

Training example

python train.py \
    --model_type mel_band_roformer \
    --config_path configs/config_mel_band_roformer_vocals.yaml \
    --start_check_point results/model.ckpt \
    --results_path results/ \
    --data_path 'datasets/dataset1' 'datasets/dataset2' \
    --valid_path datasets/musdb18hq/test \
    --num_workers 4 \
    --device_ids 0

All training parameters are here.

Training with LoRA

Look here: LoRA training

How to: Inference

Inference example

python inference.py \
    --model_type mdx23c \
    --config_path configs/config_mdx23c_musdb18.yaml \
    --start_check_point results/last_mdx23c.ckpt \
    --input_folder input/wavs/ \
    --store_dir separation_results/

All inference parameters are here. Convert models to ONNX and TensorRT formats here.

Useful notes

  • All batch sizes in config are adjusted to use with single NVIDIA A6000 48GB. If you have less memory please adjust correspodningly in model config training.batch_size and training.gradient_accumulation_steps.
  • It's usually always better to start with old weights even if shapes not fully match. Code supports loading weights for not fully same models (but it must have the same architecture). Training will be much faster.

Code description

  • configs/config_*.yaml - configuration files for models
  • models/* - set of available models for training and inference
  • dataset.py - dataset which creates new samples for training
  • gui-wx.py - GUI interface for code
  • inference.py - process folder with music files and separate them
  • train.py - main training code for single GPU
  • train_ddp.py - training code for Multi GPU config. Faster than train.py. Use it for 2 or more GPUs.
  • utils.py - common functions used by train/valid
  • valid.py - validation of model with metrics
  • ensemble.py - useful script to ensemble results of different models to make results better (see docs).

Pre-trained models

Look here: List of Pre-trained models

If you trained some good models, please, share them. You can post config and model weights in this issue.

Dataset types

Look here: Dataset types

Augmentations

Look here: Augmentations

Graphical user interface

Look here: GUI documentation or see tutorial on Youtube

Package installation

pip install msst
  • Getting started — getting started with MSST package
  • Python API — signatures, parameters, return values, and errors.
  • Command-line interface — command syntax and shell examples.
  • Compatibility — model extras, devices, and audio formats.
  • Experiments — portable organization and tracking.

Citation

  • arxiv paper
@misc{solovyev2023benchmarks,
      title={Benchmarks and leaderboards for sound demixing tasks}, 
      author={Roman Solovyev and Alexander Stempkovskiy and Tatiana Habruseva},
      year={2023},
      eprint={2305.07489},
      archivePrefix={arXiv},
      primaryClass={cs.SD}
}

GitHub Issues· 67 open

View all on GitHub
  • #252

    vinyl declicking

    Updated Aug 29, 2026
  • #249

    Permission to redistribute an ONNX export of model_bs_roformer_ep_17_sdr_9.6568 (4-stem)?

    Updated Aug 18, 2026
  • #248

    Provenance and license of the BS-Roformer-SW 6-stem checkpoint

    Updated Aug 17, 2026
  • #245

    Licence declaration for the checkpoints you trained

    Updated Aug 4, 2026
  • #237

    demix error

    Updated Jul 17, 2026
  • #235

    I need to train a four-track vocal separation model. If you have the dataset, please contact me.

    Updated Jun 22, 2026
  • #234

    how to get started

    Updated Jun 17, 2026
  • #172

    How long does it take everyone to run one epoch(batch=10)?

    Updated Jun 17, 2026
  • #38

    Dataset size

    Updated Jun 1, 2026
  • #231

    All 13 Music Demixing Benchmarks datasets available through Hugging Face Hub datasets

    Updated May 23, 2026

Highlights

  • •MDX23C based on KUIELab TFC TDF v3 architecture. Key: mdx23c.
  • •Demucs4HT [Paper]. Key: htdemucs.
  • •VitLarge23 based on Segmentation Models Pytorch. Key: segm_models.
  • •TorchSeg based on TorchSeg module. Key: torchseg.
  • •Band Split RoFormer [Paper, Repository] . Key: bs_roformer.
  • •Mel-Band RoFormer [Paper, Repository]. Key: mel_band_roformer.
  • •Swin Upernet [Paper] Key: swin_upernet.
  • •BandIt Plus [Paper, Repository] Key: bandit.
  • •SCNet [Paper, Official Repository, Unofficial Repository] Key: scnet.
  • •BandIt v2 [Paper, Repository] Key: bandit_v2.

> Tags

Python

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言