oobabooga / text-generation-webui

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

Unable to run the Silero_tts extension. #1063

Closed Penguin5353 closed 1 year ago

Penguin5353 commented 1 year ago

Describe the bug

I'm trying to use the 'silero_tts extension' but I keep getting an error. I've uninstalled and reinstalled miniconda and text generation web UI, but the error is still there. How the heck am I supposed to fix this?

I asked Microsoft Bing AI and they said, "Try fixing 'script.py'." I followed that solution, but I got the error again, and I don't know what to do anymore.

Is there an existing issue for this?

Reproduction

I open up Conda, type something like this, and run it.

`conda activate textgen

cd C:\Users\KHJ\text-generation-webui(KHJ is my computer name)

python server.py --model Alpaca-native-7b-4bit --wbits 4 --groupsize 128 --extensions google_translate whisper_stt silero_tts`

I find that if I omit silero_tts from this code, it works fine.

Screenshot

No response

Logs

(textgen) C:\Users\KHJ\text-generation-webui>python server.py --model Alpaca-native-7b-4bit --wbits 4 --groupsize 128 --extensions google_translate whisper_stt silero_tts
Loading Alpaca-native-7b-4bit...
Found the following quantized model: models\Alpaca-native-7b-4bit\alpaca7b-4bit.pt
Loading model ...
Done.
Loaded the model in 4.86 seconds.
Loading the extension "google_translate"... Ok.
Loading the extension "whisper_stt"... Ok.
Loading the extension "silero_tts"...
Using Silero TTS cached checkpoint found at C:\Users\KHJ/.cache\torch\hub
Ok.
Traceback (most recent call last):
  File "C:\Users\KHJ\text-generation-webui\server.py", line 704, in <module>
    create_interface()
  File "C:\Users\KHJ\text-generation-webui\server.py", line 682, in create_interface
    extensions_module.create_extensions_block()
  File "C:\Users\KHJ\text-generation-webui\modules\extensions.py", line 72, in create_extensions_block
    extension.ui()
  File "C:\Users\KHJ\text-generation-webui\extensions\silero_tts\script.py", line 168, in ui
    convert_confirm.click(remove_tts_from_history, [shared.gradio[k] for k in ['name1', 'name2', 'Chat mode']], shared.gradio['display'])
  File "C:\Users\KHJ\text-generation-webui\extensions\silero_tts\script.py", line 168, in <listcomp>
    convert_confirm.click(remove_tts_from_history, [shared.gradio[k] for k in ['name1', 'name2', 'Chat mode']], shared.gradio['display'])
KeyError: 'name1'

System Info

Windows 64bit (Not linux, Not wsl)
CPU: Ryzen 5600x
RAM: ddr4 16gb(8g*2)
GPU: RTX3070 8g
johnwayne087 commented 1 year ago

I am getting the same error. Everything is up to date.

python server.py --auto-devices --listen --model alpaca-native-65b --model_type LLaMA --extensions silero_tts long_term_memory --no-stream

WSL2 - Ubuntu 22.04 CPU: Ryzen 5950x RAM: ddr4 80gb(32g2 + 8g2) GPU: Dual RTX 3090 24gb*2

oobabooga commented 1 year ago

See if this fixed it https://github.com/oobabooga/text-generation-webui/commit/49ce866c99e0a1346c086b5749d6e5ae6d2923a1

Penguin5353 commented 1 year ago

Thanks to you, it worked!

johnwayne087 commented 1 year ago

Its working again for me.