rsxdalv / tts-generation-webui

TTS Generation Web UI (Bark, MusicGen + AudioGen, Tortoise, RVC, Vocos, Demucs, SeamlessM4T, MAGNet, StyleTTS2, MMS)
https://rsxdalv.github.io/tts-generation-webui/
MIT License
1.68k stars 180 forks source link

start_linux.sh fails at startup on first install #261

Closed daniel12997 closed 8 months ago

daniel12997 commented 8 months ago

I went to install using the Linux installer and got a torchaudio error, presumably due to a bad version/platform thing. This was the first time trying the install so there was nothing in the folder and I used the 6.0 installer. OS: Ubuntu 22.04.3 LTS CPU: 11th Gen Intel® Core™ i7-1165G7 @ 2.80GHz × 8 Graphics: Mesa Intel® Xe Graphics (TGL GT2)

Error message:

Successfully built react-ui Env file not found. Creating default env. Config file not found. Creating default config. Traceback (most recent call last): File "/home/danielp/Downloads/one-click-installers-tts-6.0/tts-generation-webui/server.py", line 65, in from src.tortoise.generation_tab_tortoise import generation_tab_tortoise File "/home/danielp/Downloads/one-click-installers-tts-6.0/tts-generation-webui/src/tortoise/generation_tab_tortoise.py", line 7, in from src.tortoise.gen_tortoise import ( File "/home/danielp/Downloads/one-click-installers-tts-6.0/tts-generation-webui/src/tortoise/gen_tortoise.py", line 7, in from tortoise.api import TextToSpeech, MODELS_DIR File "/home/danielp/Downloads/one-click-installers-tts-6.0/installer_files/env/lib/python3.10/site-packages/tortoise/api.py", line 10, in import torchaudio File "/home/danielp/Downloads/one-click-installers-tts-6.0/installer_files/env/lib/python3.10/site-packages/torchaudio/init.py", line 1, in from . import ( # noqa: F401 File "/home/danielp/Downloads/one-click-installers-tts-6.0/installer_files/env/lib/python3.10/site-packages/torchaudio/_extension/init.py", line 45, in _load_lib("libtorchaudio") File "/home/danielp/Downloads/one-click-installers-tts-6.0/installer_files/env/lib/python3.10/site-packages/torchaudio/_extension/utils.py", line 64, in _load_lib torch.ops.load_library(path) File "/home/danielp/Downloads/one-click-installers-tts-6.0/installer_files/env/lib/python3.10/site-packages/torch/_ops.py", line 643, in load_library ctypes.CDLL(path) File "/home/danielp/Downloads/one-click-installers-tts-6.0/installer_files/env/lib/python3.10/ctypes/init.py", line 374, in init self._handle = _dlopen(self._name, mode) OSError: /home/danielp/Downloads/one-click-installers-tts-6.0/installer_files/env/lib/python3.10/site-packages/torchaudio/lib/libtorchaudio.so: undefined symbol: _ZN2at4_ops9fft_irfft4callERKNS_6TensorEN3c108optionalINS5_6SymIntEEElNS6_INS5_17basic_string_viewIcEEEE

daniel12997 commented 8 months ago

I chose option D(CPU mode) in the installer for reference.

rsxdalv commented 8 months ago

Thanks for reporting. The installer seems to fail at installing the correct pytorch+torch audio versions together. I need to figure out which component breaks it.

The fix is to reinstall those using cmd_linux, if you have experience installing torch.

I'll look into it later today.

On Wed, Jan 17, 2024, 6:34 PM daniel12997 @.***> wrote:

I chose option D(CPU mode) in the installer for reference.

— Reply to this email directly, view it on GitHub https://github.com/rsxdalv/tts-generation-webui/issues/261#issuecomment-1896178779, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTRXI4JKYFAX6LVH6X3PUDYO74SDAVCNFSM6AAAAABB62YJ2GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJWGE3TQNZXHE . You are receiving this because you are subscribed to this thread.Message ID: @.***>

rsxdalv commented 8 months ago

Ok, I think I finally figured it out. Oulala. So what's happening is that one-click-installer installs latest pytorch in this case:

conda install -y -k pytorch torchvision torchaudio cpuonly git -c pytorch

However, since other packages like to be picky with pytorch, there are many torch==2.0.0 version selectors in the installations happening after that to prevent it from being reinstalled. It works on NVidia installs, but does the opposite on everything else.

The manual fix is to run that command again (after each update):

conda install -y -k pytorch torchvision torchaudio cpuonly git -c pytorch

But now that I know the problem I might be able to find a fix.

daniel12997 commented 8 months ago

In my case the manual fix needed the additional flag --force-reinstall to actually get the correct versions since it thought it had already installed the packages but for a completely fresh install it might not. once that was done in the conda environment it worked.

rsxdalv commented 8 months ago

Thanks for letting me know. Right now the only fix I imagine is to just automatically reinstall at the end. It will make the install slower but it's already time consuming, so I think I will do it that way for now.

rsxdalv commented 8 months ago

Ok, I added that to the update.py so that if there's no CUDA it attempts to reinstall pytorch with

conda install --force-reinstall -y -k pytorch torchvision torchaudio cpuonly git -c pytorch

command.

I will close this issue, please reopen if needed.