myshell-ai / MeloTTS

High-quality multi-lingual text-to-speech library by MyShell.ai. Support English, Spanish, French, Chinese, Japanese and Korean.
MIT License
3.97k stars 473 forks source link

AssertionError in the transforms.py file #107

Open Omenranr opened 2 months ago

Omenranr commented 2 months ago

Hello,

After following successfully the installation guide on MacOS. I get an error when trying to do inference: File "./MeloTTS/melo/transforms.py", line 172, in rational_quadratic_spline assert (discriminant >= 0).all() AssertionError After some debugging I found that discriminant contain negative values: tensor([ 34.6792, 96.5150, 53.2252, 52.8290, 67.5318, 72.1082, 110.2200, 170.8914, 27.0706, 26.2028, 148.7910, 63.9454, 15.6730, 79.4340, 41.9310, 36.1795, 41.6927], device='mps:0') tensor([31.8309, 17.1996, 19.9007, 27.4734, 35.5245, 20.9901, 40.8133, 26.3846, 49.0702, 48.1259, 16.8910, 31.5085, 89.7064, 17.0799, 26.0518, 14.2950, 16.7563], device='mps:0') tensor([-3.3324e-01, -8.0628e-01, -7.9912e-02, -4.7219e-01, -8.1269e-01, -5.7270e-01, -2.5030e-01, -1.1288e+00, -2.7676e-01, -7.7071e-02, -2.5701e+00, -3.2316e-01, -1.2017e-01, -2.4354e-01, -1.0231e-01, 6.4126e-04, -3.4380e-02], device='mps:0') I don't know why there are negative values here, it's not supposed to negative ? I can force it to become positive by doing absolute value or putting negative values to 0 but I don't want to impact results because of that. Any idea about the solution ?

Thanks.