kanttouchthis / text_generation_webui_xtts

XTTSv2 Extension for oobabooga text-generation-webui
147 stars 17 forks source link

It does not work lots of errors for example KeyError: 'xtts_v2' #9

Open CRCODE22 opened 1 year ago

CRCODE22 commented 1 year ago

[XTTS] Loading XTTS... Traceback (most recent call last): File "K:\text-generation-webui\installer_files\env\Lib\site-packages\gradio\queueing.py", line 407, in call_prediction output = await route_utils.call_process_api( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\text-generation-webui\installer_files\env\Lib\site-packages\gradio\route_utils.py", line 226, in call_process_api output = await app.get_blocks().process_api( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\text-generation-webui\installer_files\env\Lib\site-packages\gradio\blocks.py", line 1550, in process_api result = await self.call_function( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\text-generation-webui\installer_files\env\Lib\site-packages\gradio\blocks.py", line 1185, in call_function prediction = await anyio.to_thread.run_sync( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\text-generation-webui\installer_files\env\Lib\site-packages\anyio\to_thread.py", line 33, in run_sync return await get_asynclib().run_sync_in_worker_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\text-generation-webui\installer_files\env\Lib\site-packages\anyio_backends_asyncio.py", line 877, in run_sync_in_worker_thread return await future ^^^^^^^^^^^^ File "K:\text-generation-webui\installer_files\env\Lib\site-packages\anyio_backends_asyncio.py", line 807, in run result = context.run(func, args) ^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\text-generation-webui\installer_files\env\Lib\site-packages\gradio\utils.py", line 661, in wrapper response = f(args, kwargs) ^^^^^^^^^^^^^^^^^^ File "K:\text-generation-webui\modules\chat.py", line 405, in start_new_chat history['visible'] += [['', apply_extensions('output', greeting, state, is_chat=True)]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\text-generation-webui\modules\extensions.py", line 224, in apply_extensions return EXTENSION_MAP[typ](*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\text-generation-webui\modules\extensions.py", line 82, in _apply_string_extensions text = func(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "K:\text-generation-webui\extensions\text_generation_webui_xtts\script.py", line 172, in output_modifier return tts_narrator(string) ^^^^^^^^^^^^^^^^^^^^ File "K:\text-generation-webui\extensions\text_generation_webui_xtts\script.py", line 140, in tts_narrator load_model() File "K:\text-generation-webui\extensions\text_generation_webui_xtts\script.py", line 51, in load_model tts = TTS( ^^^^ File "K:\text-generation-webui\installer_files\env\Lib\site-packages\TTS\api.py", line 81, in init self.load_tts_model_by_name(model_name, gpu) File "K:\text-generation-webui\installer_files\env\Lib\site-packages\TTS\api.py", line 179, in load_tts_model_by_name model_path, config_path, vocoder_path, vocoder_config_path, model_dir = self.download_model_by_name( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\text-generation-webui\installer_files\env\Lib\site-packages\TTS\api.py", line 142, in download_model_by_name model_path, config_path, model_item = self.manager.download_model(model_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\text-generation-webui\installer_files\env\Lib\site-packages\TTS\utils\manage.py", line 337, in download_model model_item, model_full_name, model = self._set_model_item(model_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\text-generation-webui\installer_files\env\Lib\site-packages\TTS\utils\manage.py", line 294, in _set_model_item model_item = self.models_dict[model_type][lang][dataset][model]


KeyError: 'xtts_v2'
[XTTS] Loading XTTS...
Traceback (most recent call last):
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\gradio\queueing.py", line 407, in call_prediction    output = await route_utils.call_process_api(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\gradio\route_utils.py", line 226, in call_process_api
    output = await app.get_blocks().process_api(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\gradio\blocks.py", line 1550, in process_api
    result = await self.call_function(
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\gradio\blocks.py", line 1185, in call_function
    prediction = await anyio.to_thread.run_sync(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\anyio\to_thread.py", line 33, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\anyio\_backends\_asyncio.py", line 877, in run_sync_in_worker_thread
    return await future
           ^^^^^^^^^^^^
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\anyio\_backends\_asyncio.py", line 807, in run
    result = context.run(func, *args)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\gradio\utils.py", line 661, in wrapper
    response = f(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\modules\chat.py", line 405, in start_new_chat
    history['visible'] += [['', apply_extensions('output', greeting, state, is_chat=True)]]
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\modules\extensions.py", line 224, in apply_extensions
    return EXTENSION_MAP[typ](*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\modules\extensions.py", line 82, in _apply_string_extensions
    text = func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\extensions\text_generation_webui_xtts\script.py", line 172, in output_modifier
    return tts_narrator(string)
           ^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\extensions\text_generation_webui_xtts\script.py", line 140, in tts_narrator
    load_model()
  File "K:\text-generation-webui\extensions\text_generation_webui_xtts\script.py", line 51, in load_model
    tts = TTS(
          ^^^^
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\TTS\api.py", line 81, in __init__
    self.load_tts_model_by_name(model_name, gpu)
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\TTS\api.py", line 179, in load_tts_model_by_name
    model_path, config_path, vocoder_path, vocoder_config_path, model_dir = self.download_model_by_name(
                                                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\TTS\api.py", line 142, in download_model_by_name
    model_path, config_path, model_item = self.manager.download_model(model_name)
                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\TTS\utils\manage.py", line 337, in download_model    model_item, model_full_name, model = self._set_model_item(model_name)
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\TTS\utils\manage.py", line 294, in _set_model_item
    model_item = self.models_dict[model_type][lang][dataset][model]
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^
KeyError: 'xtts_v2'
[XTTS] Loading XTTS...
Traceback (most recent call last):
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\gradio\queueing.py", line 407, in call_prediction    output = await route_utils.call_process_api(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\gradio\route_utils.py", line 226, in call_process_api
    output = await app.get_blocks().process_api(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\gradio\blocks.py", line 1550, in process_api
    result = await self.call_function(
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\gradio\blocks.py", line 1185, in call_function
    prediction = await anyio.to_thread.run_sync(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\anyio\to_thread.py", line 33, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\anyio\_backends\_asyncio.py", line 877, in run_sync_in_worker_thread
    return await future
           ^^^^^^^^^^^^
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\anyio\_backends\_asyncio.py", line 807, in run
    result = context.run(func, *args)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\gradio\utils.py", line 661, in wrapper
    response = f(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\modules\chat.py", line 405, in start_new_chat
    history['visible'] += [['', apply_extensions('output', greeting, state, is_chat=True)]]
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\modules\extensions.py", line 224, in apply_extensions
    return EXTENSION_MAP[typ](*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\modules\extensions.py", line 82, in _apply_string_extensions
    text = func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\extensions\text_generation_webui_xtts\script.py", line 172, in output_modifier
    return tts_narrator(string)
           ^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\extensions\text_generation_webui_xtts\script.py", line 140, in tts_narrator
    load_model()
  File "K:\text-generation-webui\extensions\text_generation_webui_xtts\script.py", line 51, in load_model
    tts = TTS(
          ^^^^
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\TTS\api.py", line 81, in __init__
    self.load_tts_model_by_name(model_name, gpu)
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\TTS\api.py", line 179, in load_tts_model_by_name
    model_path, config_path, vocoder_path, vocoder_config_path, model_dir = self.download_model_by_name(
                                                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\TTS\api.py", line 142, in download_model_by_name
    model_path, config_path, model_item = self.manager.download_model(model_name)
                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\TTS\utils\manage.py", line 337, in download_model    model_item, model_full_name, model = self._set_model_item(model_name)
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\TTS\utils\manage.py", line 294, in _set_model_item
    model_item = self.models_dict[model_type][lang][dataset][model]
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^
KeyError: 'xtts_v2'
[XTTS] Loading XTTS...
Traceback (most recent call last):
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\gradio\queueing.py", line 407, in call_prediction    output = await route_utils.call_process_api(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\gradio\route_utils.py", line 226, in call_process_api
    output = await app.get_blocks().process_api(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\gradio\blocks.py", line 1550, in process_api
    result = await self.call_function(
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\gradio\blocks.py", line 1185, in call_function
    prediction = await anyio.to_thread.run_sync(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\anyio\to_thread.py", line 33, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\anyio\_backends\_asyncio.py", line 877, in run_sync_in_worker_thread
    return await future
           ^^^^^^^^^^^^
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\anyio\_backends\_asyncio.py", line 807, in run
    result = context.run(func, *args)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\gradio\utils.py", line 661, in wrapper
    response = f(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\modules\chat.py", line 405, in start_new_chat
    history['visible'] += [['', apply_extensions('output', greeting, state, is_chat=True)]]
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\modules\extensions.py", line 224, in apply_extensions
    return EXTENSION_MAP[typ](*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\modules\extensions.py", line 82, in _apply_string_extensions
    text = func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\extensions\text_generation_webui_xtts\script.py", line 172, in output_modifier
    return tts_narrator(string)
           ^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\extensions\text_generation_webui_xtts\script.py", line 140, in tts_narrator
    load_model()
  File "K:\text-generation-webui\extensions\text_generation_webui_xtts\script.py", line 51, in load_model
    tts = TTS(
          ^^^^
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\TTS\api.py", line 81, in __init__
    self.load_tts_model_by_name(model_name, gpu)
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\TTS\api.py", line 179, in load_tts_model_by_name
    model_path, config_path, vocoder_path, vocoder_config_path, model_dir = self.download_model_by_name(
                                                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\TTS\api.py", line 142, in download_model_by_name
    model_path, config_path, model_item = self.manager.download_model(model_name)
                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\TTS\utils\manage.py", line 337, in download_model    model_item, model_full_name, model = self._set_model_item(model_name)
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\TTS\utils\manage.py", line 294, in _set_model_item
    model_item = self.models_dict[model_type][lang][dataset][model]
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^
KeyError: 'xtts_v2'
100%|███████████████████████████████████████| 461M/461M [00:39<00:00, 12.2MiB/s]
K:\text-generation-webui\installer_files\env\Lib\site-packages\transformers\generation\utils.py:1473: UserWarning: You have modified the pretrained model configuration to control generation. This is a deprecated strategy to control generation and will be removed soon, in a future version. Please use and modify the model generation configuration (see https://huggingface.co/docs/transformers/generation_strategies#default-text-generation-configuration )
  warnings.warn(
Output generated in 13.18 seconds (9.48 tokens/s, 125 tokens, context 1164, seed 2003983919)
[XTTS] Loading XTTS...
Traceback (most recent call last):
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\gradio\queueing.py", line 407, in call_prediction    output = await route_utils.call_process_api(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\gradio\route_utils.py", line 226, in call_process_api
    output = await app.get_blocks().process_api(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\gradio\blocks.py", line 1550, in process_api
    result = await self.call_function(
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\gradio\blocks.py", line 1199, in call_function
    prediction = await utils.async_iteration(iterator)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\gradio\utils.py", line 519, in async_iteration
    return await iterator.__anext__()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\gradio\utils.py", line 512, in __anext__
    return await anyio.to_thread.run_sync(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\anyio\to_thread.py", line 33, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\anyio\_backends\_asyncio.py", line 877, in run_sync_in_worker_thread
    return await future
           ^^^^^^^^^^^^
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\anyio\_backends\_asyncio.py", line 807, in run
    result = context.run(func, *args)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\gradio\utils.py", line 495, in run_sync_iterator_async
    return next(iterator)
           ^^^^^^^^^^^^^^
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\gradio\utils.py", line 649, in gen_wrapper
    yield from f(*args, **kwargs)
  File "K:\text-generation-webui\modules\chat.py", line 342, in generate_chat_reply_wrapper
    for i, history in enumerate(generate_chat_reply(text, state, regenerate, _continue, loading_message=True)):
  File "K:\text-generation-webui\modules\chat.py", line 310, in generate_chat_reply
    for history in chatbot_wrapper(text, state, regenerate=regenerate, _continue=_continue, loading_message=loading_message):
  File "K:\text-generation-webui\modules\chat.py", line 278, in chatbot_wrapper
    output['visible'][-1][1] = apply_extensions('output', output['visible'][-1][1], state, is_chat=True)
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\modules\extensions.py", line 224, in apply_extensions
    return EXTENSION_MAP[typ](*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\modules\extensions.py", line 82, in _apply_string_extensions
    text = func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\extensions\text_generation_webui_xtts\script.py", line 172, in output_modifier
    return tts_narrator(string)
           ^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\extensions\text_generation_webui_xtts\script.py", line 140, in tts_narrator
    load_model()
  File "K:\text-generation-webui\extensions\text_generation_webui_xtts\script.py", line 51, in load_model
    tts = TTS(
          ^^^^
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\TTS\api.py", line 81, in __init__
    self.load_tts_model_by_name(model_name, gpu)
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\TTS\api.py", line 179, in load_tts_model_by_name
    model_path, config_path, vocoder_path, vocoder_config_path, model_dir = self.download_model_by_name(
                                                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\TTS\api.py", line 142, in download_model_by_name
    model_path, config_path, model_item = self.manager.download_model(model_name)
                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\TTS\utils\manage.py", line 337, in download_model    model_item, model_full_name, model = self._set_model_item(model_name)
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "K:\text-generation-webui\installer_files\env\Lib\site-packages\TTS\utils\manage.py", line 294, in _set_model_item
    model_item = self.models_dict[model_type][lang][dataset][model]
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^
KeyError: 'xtts_v2'
CRCODE22 commented 1 year ago

The extension with the name coqui_tts however does work.