Demucs WebGPU
Demucs WebGPU is a browser-focused extension of sevagh’s demucs.onnx, which brings the Demucs v4 hybrid transformer into an ONNX-based inference pipeline for music source separation.
As part of my work on CORPUS, I wanted to see how far this could be pushed directly in the browser, and specifically whether WebGPU could make a serious difference. The answer was yes: with the right changes, Demucs can run surprisingly efficiently client-side and feel genuinely fast.
What I changed
The goal was simply to adapt the original project and extend it for practical WebGPU execution on the web.
That included:
- pushing inference through ONNX Runtime Web with the WebGPU execution provider
- building the surrounding DSP path around it with WASM
- keeping the full separation flow in-browser, from loading audio to rendering separated stems
- adding a simple interactive demo interface with waveform views, transport controls, stem muting/soloing, and downloads
I also added some practical web-facing work around model loading and asset handling so the whole experience feels more like a usable demo than a raw port.
Why it was interesting
What I liked about this project was that it makes a fairly strong point very quickly: heavyweight music ML models do not always need to stay trapped in native desktop code or server-side inference setups.
With WebGPU, the browser becomes a viable place to run this kind of model at useful speed. That opens up interesting possibilities for lightweight music tools, interactive demos, and more accessible deployment of audio ML systems. For instance, this exact system powers real-time source separation in Reef DJ.
Demo
You can try the live demo here: