MelBand-RoFormer-Infer
Production-ready, inference-only toolkit for Mel-Band RoFormer audio source separation
MelBand-RoFormer-Infer provides a clean, lightweight API for running music source separation inference using Mel-Band RoFormer models with automatic checkpoint management.
Features
- Inference Only: Lightweight package focused on production inference
- Auto-Download: the default model is fetched on first use and sha256-verified against recorded checksums
- Model Registry: 89 catalogued models -- vocals, instrumentals, karaoke, denoise, dereverb, and more (see the availability note below)
- CLI Tools:
melband-roformer-inferandmelband-roformer-downloadcommands - Python API: Clean programmatic interface
Quick Start
Installation
# Using pip
pip install melband-roformer-infer
# Using UV (recommended)
uv pip install melband-roformer-infer
CLI Inference
# First run auto-downloads the recommended MelBand Roformer Kim model (~913 MB,
# sha256-verified) into ~/.cache/melband-roformer-infer/ -- no separate download step needed
melband-roformer-infer --input_folder ./songs --store_dir ./outputs
Every WAV inside input_folder produces *_vocals.wav and *_instrumental.wav stems. Explicit --config_path/--model_path arguments still work and skip auto-resolution entirely; --model <slug> picks a different registry model to auto-resolve.
Python API
from ml_collections import ConfigDict
import torch
import yaml
from mel_band_roformer import DEFAULT_MODEL, ensure_model_assets, get_model_from_config
# Resolves local copies, or downloads (sha256-verified) on first use
ckpt_path, config_path = ensure_model_assets(DEFAULT_MODEL)
config = ConfigDict(yaml.safe_load(open(config_path)))
model = get_model_from_config("mel_band_roformer", config)
model.load_state_dict(torch.load(ckpt_path, map_location="cpu"))
Model Weights
Where weights live
Downloads default to ~/.cache/melband-roformer-infer/<model-slug>/. The
location is configurable, resolved in this order:
- Explicit argument:
--models_dir(inference CLI),--output-dir(download CLI), orensure_model_assets(..., models_dir=...)(API) - The
MELBAND_ROFORMER_MODELS_PATHenvironment variable - The default
~/.cache/melband-roformer-infer/
A relative ./models directory (the pre-0.1.4 default) is still searched as a
read fallback, so existing downloads keep working without re-fetching.
Auto-download
When melband-roformer-infer runs without --model_path/--config_path, the
requested registry model (default: MelBand Roformer Kim) is looked up in the
directories above and downloaded on first use. Downloads are verified against
the sha256 checksums recorded in src/mel_band_roformer/data/checksums.json
(71 assets covering every URL that was live in the 2026-07-12 audit); a
mismatch deletes the file and retries instead of keeping a corrupt checkpoint.
Assets without a recorded hash (only reachable via unaudited fallback URLs)
print a warning and fall back to a basic size check.
Manual download (offline / air-gapped)
The recommended Kim model needs one file (its config ships inside the package):
| File | URL | sha256 |
|---|---|---|
MelBandRoformer.ckpt (913,106,900 bytes) |
https://huggingface.co/KimberleyJSN/melbandroformer/resolve/main/MelBandRoformer.ckpt | 87201f4d31afb5bc79993230fc49446918425574db48c01c405e44f365c7559e |
Place it at
~/.cache/melband-roformer-infer/melband-roformer-kim-vocals/MelBandRoformer.ckpt
(or the equivalent path under your MELBAND_ROFORMER_MODELS_PATH), and
inference will pick it up without network access. For any other model, the
download URL is the overrides.json entry for its checkpoint (or the TRvlvr
fallback) and the expected sha256 is in data/checksums.json.
Download CLI (manual path)
# List available models
melband-roformer-download --list-models
# Download the recommended model into the cache dir
melband-roformer-download --model melband-roformer-kim-vocals
# Download by category into a custom directory
melband-roformer-download --category karaoke --output-dir ./models
Recommended Model
MelBand Roformer Kim (melband-roformer-kim-vocals) by Kimberley Jensen is the recommended default model for vocal separation. It provides excellent quality and is the foundation for many fine-tuned variants.
from mel_band_roformer import DEFAULT_MODEL
print(DEFAULT_MODEL) # "melband-roformer-kim-vocals"
Available Models
| Model | Category | Description |
|---|---|---|
melband-roformer-kim-vocals |
vocals | Recommended - Original MelBand Roformer by Kimberley Jensen |
melband-roformer-big-beta6 |
vocals | Big Beta 6 by unwa |
roformer-model-melband-roformer-vocals-by-becruily |
vocals | Vocals by becruily |
roformer-model-melband-roformer-instrumental-by-gabox |
instrumental | Instrumental by Gabox |
roformer-model-melband-roformer-karaoke-by-becruily |
karaoke | Karaoke by becruily |
melband-roformer-denoise-debleed-gabox |
denoise | Denoise Debleed by Gabox |
roformer-model-melband-roformer-de-reverb-by-anvuew |
dereverb | De-Reverb by anvuew |
| ... | ... | See --list-models for 89 models |
Categories: vocals, instrumental, karaoke, denoise, dereverb, crowd, general, aspiration
Note on download availability (re-audited 2026-07-12): this registry is bulk-imported from several third-party contributors' Hugging Face repos, some of which get renamed or taken down without notice (see
CHANGELOG.mdfor the 2026-07 audit and the jarredou account deletion). As of the latest audit, 37 of the 89 registry models are fully usable (checkpoint and config both live -- all of these carry recorded sha256 checksums); 36 checkpoints are dead, and 10 models are fully dead (both checkpoint and config unreachable). Runpython tools/check_weights_liveness.py(needs network access) to re-check which models currently have a live download URL before relying on one in a pipeline;--model/--categorydownloads will print a clear error if a URL 404s rather than failing silently.
Registry Helpers
from mel_band_roformer import MODEL_REGISTRY
# List all categories
print(MODEL_REGISTRY.categories())
# List models by category
for model in MODEL_REGISTRY.list("vocals"):
print(model.name, model.checkpoint)
# Search models
results = MODEL_REGISTRY.search("karaoke")
for m in results:
print(m.slug)
# Pretty-print all models
print(MODEL_REGISTRY.as_table())
Development Installation
# Clone repository
git clone https://github.com/openmirlab/melband-roformer-infer.git
cd melband-roformer-infer
# Install with UV
uv sync
# Install with pip
pip install -e ".[dev]"
Acknowledgments
This project builds upon the excellent work of several open-source projects:
- Mel-Band-Roformer-Vocal-Model by Kimberley Jensen - Original model and training
- BS-RoFormer by Phil Wang (lucidrains) - PyTorch implementation of the RoFormer architecture
- python-audio-separator by Andrew Beveridge (nomadkaraoke) - Pre-trained checkpoints and model configurations
- Original Research - Wei-Tsung Lu, Ju-Chiang Wang, Qiuqiang Kong, and Yun-Ning Hung for the Band-Split RoPE Transformer paper
License
MIT License - see LICENSE for details.
This project includes code and configurations adapted from:
- BS-RoFormer (MIT) - Phil Wang
- python-audio-separator (MIT) - Andrew Beveridge
- Mel-Band-Roformer-Vocal-Model - Kimberley Jensen
Citation
If you use MelBand-RoFormer-Infer in your research, please cite the original paper:
@inproceedings{Lu2023MusicSS,
title = {Music Source Separation with Band-Split RoPE Transformer},
author = {Wei-Tsung Lu and Ju-Chiang Wang and Qiuqiang Kong and Yun-Ning Hung},
year = {2023},
url = {https://api.semanticscholar.org/CorpusID:261556702}
}
Support
For issues and questions:
- GitHub Issues: github.com/openmirlab/melband-roformer-infer/issues
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file melband_roformer_infer-0.1.5.tar.gz.
File metadata
- Download URL: melband_roformer_infer-0.1.5.tar.gz
- Upload date:
- Size: 31.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b669ad3de153e9a7a2f3fd099b8288be75355fe952f7c79c864e30ed4f36ec94
|
|
| MD5 |
54252b3c58597b9aeb7ceb1bda58260e
|
|
| BLAKE2b-256 |
935972403bb2b487713629eb1ef25d5a1c72d6f9c236022b6635d57d79573eb7
|
Provenance
The following attestation bundles were made for melband_roformer_infer-0.1.5.tar.gz:
Publisher:
publish.yml on openmirlab/melband-roformer-infer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
melband_roformer_infer-0.1.5.tar.gz -
Subject digest:
b669ad3de153e9a7a2f3fd099b8288be75355fe952f7c79c864e30ed4f36ec94 - Sigstore transparency entry: 2148124799
- Sigstore integration time:
-
Permalink:
openmirlab/melband-roformer-infer@fda5d8cb65403a04e2d143ecd130f508c2f8370f -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/openmirlab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@fda5d8cb65403a04e2d143ecd130f508c2f8370f -
Trigger Event:
release
-
Statement type:
File details
Details for the file melband_roformer_infer-0.1.5-py3-none-any.whl.
File metadata
- Download URL: melband_roformer_infer-0.1.5-py3-none-any.whl
- Upload date:
- Size: 35.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8b509b90c9c02f014730c897222a31471db59a2d538bf60a5a9e6469c14823e3
|
|
| MD5 |
eace3190c9ccdca4175764849883f27e
|
|
| BLAKE2b-256 |
768ae1f8d541051e4aa74d01e2ce379017cdbcb6b88ec5f1d91879dd0f540a3d
|
Provenance
The following attestation bundles were made for melband_roformer_infer-0.1.5-py3-none-any.whl:
Publisher:
publish.yml on openmirlab/melband-roformer-infer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
melband_roformer_infer-0.1.5-py3-none-any.whl -
Subject digest:
8b509b90c9c02f014730c897222a31471db59a2d538bf60a5a9e6469c14823e3 - Sigstore transparency entry: 2148124811
- Sigstore integration time:
-
Permalink:
openmirlab/melband-roformer-infer@fda5d8cb65403a04e2d143ecd130f508c2f8370f -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/openmirlab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@fda5d8cb65403a04e2d143ecd130f508c2f8370f -
Trigger Event:
release
-
Statement type: