-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
onnx exported problem #8
Comments
torch.istft is currently not support to convert to onnx and still in development, see: pytorch/pytorch#81075 |
Hi @unparalleled-ysj, I'm sorry to be late... |
Maybe this URL will also be useful for torch onnx. |
I'm confused, we have to pass istft function to get wav, if we exclude istft part, we can't get result @MasayaKawamura |
@Jackiexiao |
ok, I get, looking forward to get istft support in torch nightly, so we just need onnx during inference |
You can use Line 144 in df2f8d3
Line 197 in df2f8d3
|
thx |
Hi @MasayaKawamura |
FYI see: https://github.com/wenet-e2e/wetts/blob/main/wetts/vits/export_onnx.py but you can't export istft vocoder to onnx here @FanhuaandLuomu |
hi @Jackiexiao, I have tried the above script to export but I have had no success. Would you mind sharing your export code? |
Hi @FanhuaandLuomu, have you succeeded in exporting the model? |
@abylouw it just work in original vits(not for mbistft, but they work the same way, except the vocoder part), and wetts repo has all code you need |
Do we need to use the class STFT instead of TorchSTFT during the training in this case? |
I have tried to split the MB-iSTFT-VITS into this two parts and the former transfered into onnx, it is succeed. but as to the MS-iSTFT-VITS, I have to split the model into three parts, which case the first and the third part should be transfer into onnx models. as to the third part, the multi-band filter, the |
You do not have to use STFT during training, only during export. See here alphacep/MB-iSTFT-VITS2@29c91d4 see also |
I used this code to transfer onnx to process the pre-trained model provided, why did I report this error:AttributeError: 'ResidualCouplingLayer' object has no attribute 'remove_weight_norm' |
No, the STFT from this project, which is the same with the one from the iSTFTNet project, is not good for onnx model exporation. |
May I ask how you dealt with the “RuntimeError: Unknown number type: complex” problem caused by torch.istft when exporting the onnx model
The text was updated successfully, but these errors were encountered: