Try it now: https://nikhilunni.github.io/demucs-rs/ (needs a WebGPU-capable browser — Chrome/Edge work best)
GitHub: https://github.com/nikhilunni/demucs-rs
It runs three ways:
- In the browser — the full ML inference pipeline compiles to WASM and runs on your GPU via WebGPU. No uploads, nothing leaves your machine.
- Native CLI — Metal on macOS, Vulkan on Linux/Windows. Faster than the browser path.
- DAW plugin — VST3/CLAP plugin for macOS with a native SwiftUI UI. Load a track, separate it, drag stems directly into your DAW timeline, or play as a MIDI instrument with solo / faders.
The core inference library is built on Burn (https://burn.dev), a Rust deep learning framework. The same `demucs-core` crate compiles to both native and `wasm32-unknown-unknown` — the only thing that changes is the GPU backend.
Model weights are F16 safetensors hosted on Hugging Face and downloaded / cached automatically on first use on all platforms. Three variants: standard 4-stem (84 MB), 6-stem with guitar/piano (84 MB), and a fine-tuned bag-of-4-models for best quality (333 MB).
The existing implementations I found online were mostly wrappers around the original Python implementation, and not very portable -- the model works remarkably well and I wanted to be able to quickly create samples / remixes without leaving the DAW or my browser. Right now the implementation is pretty MacOS heavy, as that's what I'm testing with, but all of the building blocks for other platforms are ready to build on. I want this to grow to be a general utility for music producers, not just "works on my machine."
It was a fun first foray into DSP and the state of the art of ML over WASM, with lots of help from Claude!