oobabooga / text-generation-webui

A Gradio web UI for Large Language Models.
GNU Affero General Public License v3.0
40.55k stars 5.31k forks source link

Linux container - most TTS extensions aren't usable. #5523

Closed armelvil closed 6 months ago

armelvil commented 8 months ago

Describe the bug

There seems to be a large number of unresolved python issues loading the TTS extensions.

Running TGWUI and enabling basically any TTS extension results in something breaking, somehow.

Is there an existing issue for this?

Reproduction

Setup in a podman container, permissions are fine, run tgwui and enable extensions from the gradio interface, sit back as everything breaks.

Screenshot

No response

Logs

enabling extensions results in the following errors:

`17:47:56-511114 INFO     Loading the extension "text_generation_webui_xtts"     

17:47:56-513533 ERROR    Could not import the requirements for                  

                         'text_generation_webui_xtts'. Make sure to install the 

                         requirements for the extension.                        

                         Linux / Mac:                                           

                         pip install -r                                         

                         extensions/text_generation_webui_xtts/requirements.txt 

                         --upgrade                                              

                         Windows:                                               

                         pip install -r                                         

                         extensions\text_generation_webui_xtts\requirements.txt 

                         --upgrade                                              

                         If you used the one-click installer, paste the command 

                         above in the terminal window opened after launching the

                         cmd script for your OS.                                

17:47:56-515310 ERROR    Failed to load the extension                           

                         "text_generation_webui_xtts".                          

Traceback (most recent call last):

  File "/dockerx/text-generation-webui/modules/extensions.py", line 36, in load_extensions

    exec(f"import extensions.{name}.script")

  File "<string>", line 1, in <module>

  File "/dockerx/text-generation-webui/extensions/text_generation_webui_xtts/script.py", line 1, in <module>

    from TTS.api import TTS

ModuleNotFoundError: No module named 'TTS'

17:47:56-516498 INFO     Loading the extension "whisper_stt"                    

17:47:56-519892 INFO     Loading the extension "Diffusion_TTS"                  

17:47:57-530046 ERROR    Could not import the requirements for 'Diffusion_TTS'. 

                         Make sure to install the requirements for the          

                         extension.                                             

                         Linux / Mac:                                           

                         pip install -r                                         

                         extensions/Diffusion_TTS/requirements.txt --upgrade    

                         Windows:                                               

                         pip install -r                                         

                         extensions\Diffusion_TTS\requirements.txt --upgrade    

                         If you used the one-click installer, paste the command 

                         above in the terminal window opened after launching the

                         cmd script for your OS.                                

17:47:57-532548 ERROR    Failed to load the extension "Diffusion_TTS".          

Traceback (most recent call last):

  File "/dockerx/text-generation-webui/modules/extensions.py", line 36, in load_extensions

    exec(f"import extensions.{name}.script")

  File "<string>", line 1, in <module>

  File "/dockerx/text-generation-webui/extensions/Diffusion_TTS/script.py", line 13, in <module>

    from modules import chat, shared, tts_preprocessor, ui_chat

  File "/dockerx/text-generation-webui/modules/tts_preprocessor.py", line 3, in <module>

    from num2words import num2words

ModuleNotFoundError: No module named 'num2words'`

System Info

EPYC 2nd Gen, Instinct MI60
armelvil commented 8 months ago

It seems others on windows are running into the same issues. I've attempted pip install -r on all of these extensions, and it hasn't altered the behavior.

Unfortunately I'm not sufficiently versed in Python to troubleshoot it myself.

The same behavior hits on coqui_tts and silero_tts

thelabcat commented 8 months ago

Silero TTS attempted user here, I think this is because the program is using its own copy of python, so system pip installs the requirements to the wrong place. Looking into that...

thelabcat commented 8 months ago

It's very hacky, but basically, I edited start_linux.sh to call this at the very end instead of starting the server: python -m pip install -r extensions/silero_tts/requirements.txt --upgrade With the proper environment for everything already set up by the script, the modules install to the right place.

github-actions[bot] commented 6 months ago

This issue has been closed due to inactivity for 2 months. If you believe it is still relevant, please leave a comment below. You can tag a developer in your comment.

thelabcat commented 6 months ago

Yeah, it's still relevant, @oobabooga just hasn't fixed it yet. Mister bot, what makes you think that because something wasn't fixed it just suddenly fixes itself? You robots do not have self repair or self healing like creatures do.