Export to ONNX for WebGPU / WASM inference?

#3
by ldenoue - opened

I tried exporting the model using the ONNX converter https://huggingface.co/spaces/onnx-community/convert-to-onnx but it fails.

Has anyone interest in getting the ONNX version somehow?

Hi Idenoue, I checked the error, and it seems like their transformers version is out of date. Upgrading transformers should solve this problem.

This is absolutely amazing. How could you do this so quickly? I runs really well on my Mac in Chrome.

@kevinahm how could we get a quantized version? If you have some info on how you created the ONNX files I could have a look and try by myself.

hey your tts is very great , i'm using it in my AI vtuber project, but there is problem that it works fine when i generate audio while my internet is ON but when i turn my internet OFF it still generates the audio but it also shows these messages in terminal -- Using backend lmdeploy.
Add dll path C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.0\bin, please note cuda version should >= 11.3 when compiled with cuda 11
torch_dtype is deprecated! Use dtype instead!
'(MaxRetryError('HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /ekwek/Soprano-80M/resolve/main/decoder.pth (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x000001AA2B9E2B90>: Failed to resolve 'huggingface.co' ([Errno 11001] getaddrinfo failed)"))'), '(Request ID: 71147e71-aa72-4041-a946-fa335e49bd37)')' thrown while requesting HEAD https://huggingface.co/ekwek/Soprano-80M/resolve/main/decoder.pth
Retrying in 1s [Retry 1/5].
'(MaxRetryError('HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /ekwek/Soprano-80M/resolve/main/decoder.pth (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x000001AA6216C4D0>: Failed to resolve 'huggingface.co' ([Errno 11001] getaddrinfo failed)"))'), '(Request ID: d1bc782d-e76c-4ecd-88fe-091b8caede24)')' thrown while requesting HEAD https://huggingface.co/ekwek/Soprano-80M/resolve/main/decoder.pth
Retrying in 2s [Retry 2/5].
'(MaxRetryError('HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /ekwek/Soprano-80M/resolve/main/decoder.pth (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x000001AA6216DF10>: Failed to resolve 'huggingface.co' ([Errno 11001] getaddrinfo failed)"))'), '(Request ID: 9f868c51-dbc4-4afc-a82b-eba769b50201)')' thrown while requesting HEAD https://huggingface.co/ekwek/Soprano-80M/resolve/main/decoder.pth
Retrying in 4s [Retry 3/5].
'(MaxRetryError('HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /ekwek/Soprano-80M/resolve/main/decoder.pth (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x000001AA6216F750>: Failed to resolve 'huggingface.co' ([Errno 11001] getaddrinfo failed)"))'), '(Request ID: 950fb8f5-b04a-4dd7-a0b9-c65bf2e1b407)')' thrown while requesting HEAD https://huggingface.co/ekwek/Soprano-80M/resolve/main/decoder.pth
Retrying in 8s [Retry 4/5].
'(MaxRetryError('HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /ekwek/Soprano-80M/resolve/main/decoder.pth (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x000001AA621BB790>: Failed to resolve 'huggingface.co' ([Errno 11001] getaddrinfo failed)"))'), '(Request ID: e023c8cd-2c79-405a-9787-48277e0df8b4)')' thrown while requesting HEAD https://huggingface.co/ekwek/Soprano-80M/resolve/main/decoder.pth
Retrying in 8s [Retry 5/5].
'(MaxRetryError('HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /ekwek/Soprano-80M/resolve/main/decoder.pth (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x000001AA621BA7D0>: Failed to resolve 'huggingface.co' ([Errno 11001] getaddrinfo failed)"))'), '(Request ID: fbf7fe1f-0593-466a-aa33-8ece01cbe935)')' thrown while requesting HEAD https://huggingface.co/ekwek/Soprano-80M/resolve/main/decoder.pth i dont want to wait this long while it can generate audio without internet. I hope you replies back

Hi, I believe setting the environment variable HF_HUB_OFFLINE=1 will fix this

thank you so much for replying back, i really appreciate it, it helped me so much. πŸ˜„

@kevinahm how could we get a quantized version? If you have some info on how you created the ONNX files I could have a look and try by myself.

https://huggingface.co/KevinAHM/soprano-1.1-onnx
https://huggingface.co/spaces/KevinAHM/soprano-web-onnx (int8 vocoder, fp32 backbone)

Sign up or log in to comment