Skip to content

Commit a0d8a63

Browse files
Merge pull request #412 from dhunstack/benchmarknum
[blog] Update Demucs ONNX Export blog
2 parents 80c1cdd + 352aaa1 commit a0d8a63

1 file changed

Lines changed: 24 additions & 1 deletion

File tree

content/news/2025-10-27-gsoc2025-demucs-to-onnx-dhunstack.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,24 @@ To evaluate the exported ONNX model, we developed benchmarking scripts for both
261261
## Benchmark Results
262262

263263
The quality of the model is expected to be equal or slightly worse when exported to ONNX. While there are plenty of ways of measuring the benchmarks models (another blog post incoming), we've chosen to measure our models with `SI-SDR` metric, Scale Invariant Signal To Distortion Ratio, on the MusDB dataset. This is the standard metric on which researchers report their source separation model's performance.
264-
After export, the model's performance is nearly identical.
264+
265+
We conducted comprehensive benchmarking on both CPU and GPU platforms, evaluating 50 tracks from the MusDB test dataset (approximately 3.46 hours of audio).
266+
267+
#### CPU Performance Comparison
268+
269+
| Metric | PyTorch Model | C++ ONNX Model | Improvement |
270+
|--------|---------------|----------------|-------------|
271+
| Total Processing Time | 5,380.35 sec | 4,415.30 sec | **17.94% faster** |
272+
| Processing Time for 1 min input | 25.89 sec | 21.24 sec | **17.94% faster** |
273+
274+
#### GPU Performance Comparison
275+
276+
| Metric | PyTorch Model (GPU) | Python ONNXRuntime (GPU) | Difference |
277+
|--------|---------------------|------------------|------------|
278+
| Total Processing Time | 354.13 sec | 386.40 sec | **8.35% slower** |
279+
| Processing Time for 1 min input | 1.70 sec | 1.86 sec | **8.35% slower** |
280+
281+
#### Audio Quality Results
265282

266283
| Stem | PyTorch Model (dB) | ONNX Model (C++) (dB) |
267284
|--------------|--------------------|-----------------------|
@@ -275,6 +292,12 @@ After export, the model's performance is nearly identical.
275292

276293
Typical high-performing models achieve around **7–9 dB** on vocals in the [MusDB](https://sigsep.github.io/datasets/musdb.html) benchmark - with 0 dB meaning no separation improvement over the original mixture.
277294

295+
**Key Findings:**
296+
297+
- **CPU Performance**: The C++ ONNX model delivers significant performance improvements (17.94% faster) while maintaining equivalent audio quality
298+
- **GPU Performance**: PyTorch maintains a performance advantage on GPU (8.35% faster), likely due to optimized CUDA implementations
299+
- **Audio Quality**: Both implementations produce nearly identical separation quality across all stems (< 0.1 dB difference)
300+
278301
Now that we have a running platform independent high quality ONNX Demucs model that can utilize hardware acceleration and be deployed with C++, we plan to integrate this into Mixxx DJ for future.
279302
We've prepared example scripts for running the exported Demucs model, which can be used following the instructions documented in our READMEs.
280303

0 commit comments

Comments
 (0)