Is it possible to share the source code?

#1
by gyagp - opened

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.

Diffusion Studio GmbH org

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/[email protected]/dist/' (the original one seems not work), I can run this model well with WebGPU EP with the latest 1.19.2 release.

@gyagp do you have a github where we can test it too?

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.

Sign up or log in to comment