Spaces:
Running
Is it possible to share the source code?
The demo is very cool!
This is Yang Gu from Intel, and currently we're working on ONNX Runtime WebGPU EP together with Microsoft. Did you by any chance try this demo with ONNX Runtime WebGPU? Is it possible that you may share the source code?
I mean: npm i @diffusionstudio/vits-web
and you'll have all the source code there.
Thanks for the compliment :) Yes the source code is available on github https://github.com/diffusionstudio/vits-web. I already played around with switching the onnx backend to webgpu, but it didn't work the first try. I was getting an error about the tanh function not being supported while the spec clearly states that it is. If you have any insights into this I'd appreciate the help
Thanks for the code! Activation Tanh support was introduced in https://github.com/microsoft/onnxruntime/pull/21540, and was ready starting from onnxruntime-web 1.19.0, while your repo is based on onnxruntime-web 1.18.0.
However, I just gave a try, and it seems the recent builds are broken. We'll fix them soon and let you know.
After changing the ONNX_BASE to 'https://cdn.jsdelivr.net/npm/onnxruntime-web@1.19.2/dist/' (the original one seems not work), I can run this model well with WebGPU EP with the latest 1.19.2 release.
I put my changes to https://github.com/gyagp/vits-web. But according to my test, wasm has better performance than webgpu now. I will take a further look.
The latest WebGPU EP already greatly improved the perf of this model, majorly because of our optimization at https://github.com/microsoft/onnxruntime/pull/21892. I just updated the code to use the dev release of onnxruntime-web.
On my dev machine, wasm is still faster than webgpu. But I have very powerful CPU (i9) and relatively poor GPU (32EUs) here ;) Look forward to hearing back from your data.