BandIt v2 — music branch, ONNX for browsers (unofficial mirror)
This repository is an unofficial mirror of a browser-ready conversion of the BandIt v2 cinematic audio source separation model (music stem only). It is not affiliated with or endorsed by the original authors or the converter. DenoMCP uses these files in its in-browser tool denomcp.com/bgm-remover.
Credits and license
- Model: BandIt v2 — Karn N. Watcharasupat, Chih-Wei Wu, Iroro Orife. Paper: Remastering Divide and Remaster: A Cinematic Audio Source Separation Dataset with Multilingual Support.
- Official code: kwatcharasupat/bandit-v2 (Apache-2.0, see
LICENSE-BANDIT-APACHE-2.0.txt), revisiond5563d9031e95fdaa3e5a73d5020b9a0df61adb6. - Official weights:
checkpoint-multi.ckpt, Zenodo 10.5281/zenodo.12701995, CC BY-SA 4.0. - Browser conversion: Prompt_what, promptwhat/bgm-separator
at commit
b3828a2086269be71a23d3e111efdf4e5de65258. Only the music stem is kept; the network is split into three parts;bandit-tf.binholds the same GRU weights transposed as float32. No retraining, quantization or weight edits (seeNOTICE-BANDIT.txt). - This mirror: the converted files are redistributed unchanged (byte-identical, hashes below) under the same CC BY-SA 4.0 license. Nothing here restricts the rights granted by that license.
Files
| File | Bytes | SHA-256 |
|---|---|---|
bandit-split.onnx | 2,423,065 | fa7973660fd3cf90e84fd0a2ea7a096ce25635f9b14e0b9825e47439476eeb77 |
bandit-tf.onnx | 55,572,411 | 6c4c5d8115d73b6dc8d76572639dd734d82e0ddee8f5c06e417b86a8e89a02bb |
bandit-tf.bin | 42,164,224 | 80ea77969e56d3349090582a600d95ca6e89dd325ff60ab886eea566a4952f3f |
bandit-mask.onnx | 34,958,777 | e83c135e15be1c4fa74a05b1da7461acaf786b4d19a1adcc51ddfef4572eb691 |
bandit.json | 10,572 | configuration and tfLayout (offsets inside bandit-tf.bin) |
bandit-split.onnx:spec_real,spec_imag[1, 1025, 751]→z[1, 64, 751, 128]bandit-tf.onnx:z→q[1, 64, 751, 128](16 residual bidirectional GRU layers, alternating time and band axes)bandit-mask.onnx:q→mask_real,mask_imag[1, 1025, 751](complex mask for the music stem)bandit-tf.bin: thetfstage as raw float32 for custom GPU kernels. Per layer (658,816 floats): LayerNorm weight 128, bias 128,w_ih_t[direction 2][input 128][768],w_hh_t[2][256][768],b_ih[2][768],b_hh[2][768],fc.weight_t[512][128],fc.bias128. Gate order r, z, n (PyTorch).
Input convention (verified against the official PyTorch model)
- Audio: mono, 48 kHz, chunks of 384,000 samples (8 s).
- STFT:
n_fft2048, hop 512, periodic Hann window of length 2048,center=Truewith reflect padding, one-sided. - Feed the un-normalized STFT (plain
torch.stft, no window normalization). The split graph already contains the1/sqrt(sum(window^2))scaling of torchaudio'snormalized=True. Feeding an already normalized spectrum shifts the output noticeably (on our test chunkzdiffered by 69% relative error). - Music spectrum = STFT × complex mask; invert with an un-normalized iSTFT (same window, hop and centering).
- With this convention, DenoMCP's browser pipeline matched the official PyTorch model on a real 8 s stereo chunk at 118.6 dB SNR, and matched the official chunked inference (8 s windows, 1 s hop, Hann overlap-add) at 114–119 dB.
Notes
- The official checkpoint also contains speech and effects stems; this conversion keeps the music stem only.
- Results depend on the material. Removing music can also affect dialogue or effects that overlap it; listen before use.