gitmylo / audio-webui

A webui for different audio related Neural Networks
MIT License
1.01k stars 94 forks source link

Install the numpy==1.23.5 dependency AFTER TTS #107

Closed cocktailpeanut closed 1 year ago

cocktailpeanut commented 1 year ago

Related to this error: https://github.com/gitmylo/audio-webui/issues/49

The reason this is happening is because the magicinstaller has hardcoded numpy as 1.23.5, but if you look at TTS, it uses lower versions depending on python version: https://github.com/coqui-ai/TTS/blob/dev/requirements.txt#L2-L3

numpy==1.22.0;python_version<="3.10"
numpy==1.24.3;python_version>"3.10"

Initially I tried to tackle this problem by just getting rid of the 1.23.5, and it did solve the installation problem (I could launch the web UI).

However this resulted in the installed torch not recognizing numpy and kept throwing an "Numpy is not available" error when I actually tried to generate audio inside the web ui.

So the solution was to keep the 1.23.5, but move the TTS install step to the beginning, so the numpy 1.23.5 would override the requirements specified in the TTS package (as mentioned above)

gitmylo commented 1 year ago

Odd that coqui TTS would install numpy==1.24.3;python_version>"3.10" when it officially does not support 3.11 at all. But yeah, installing numpy after TTS might help some people, i'll merge it, but if there's people getting issues from that, i'll revert it.

cocktailpeanut commented 1 year ago

Thanks! at least I can confirm this has fixed issues on at least 4 devices of mine (windows and mac) as well as several other people who had the same issue. They were completely broken before but now they all work.