lenML / ChatTTS-Forge

🍦 ChatTTS-Forge is a project developed around TTS generation model, implementing an API Server and a Gradio-based WebUI.
https://huggingface.co/spaces/lenML/ChatTTS-Forge
GNU Affero General Public License v3.0
650 stars 82 forks source link

[BUG:WebUI] 音色抽卡失败 #69

Closed WangLaoShi closed 2 months ago

WangLaoShi commented 2 months ago

阅读 README.md 和 dependencies.md

检索 issue 和 discussion

检查 Forge 版本

Forge Commit 或者 Tag

123

Python 版本

3.10

PyTorch 版本

1

操作系统信息

Windows

浏览器信息

No response

BUG 描述

image

复现步骤

image

期望结果

正常使用

实际结果

出错

错误信息

2024-06-24 19:00:36,090 - modules.models - INFO - Loading ChatTTS models
2024-06-24 19:00:36,091 - modules.ChatTTS.ChatTTS.core - INFO - Load from local: ./models/ChatTTS
2024-06-24 19:00:36,335 - modules.ChatTTS.ChatTTS.core - INFO - vocos loaded.
2024-06-24 19:00:36,457 - modules.ChatTTS.ChatTTS.core - INFO - dvae loaded.
2024-06-24 19:00:39,480 - modules.ChatTTS.ChatTTS.core - INFO - gpt loaded.
2024-06-24 19:00:39,665 - modules.ChatTTS.ChatTTS.core - INFO - decoder loaded.
2024-06-24 19:00:39,681 - modules.ChatTTS.ChatTTS.core - INFO - tokenizer loaded.
2024-06-24 19:00:39,681 - modules.ChatTTS.ChatTTS.core - INFO - All initialized.
2024-06-24 19:00:39,682 - modules.models - INFO - ChatTTS models loaded
C:\Users\win10\.conda\envs\ChatTTS\Lib\site-packages\transformers\models\llama\modeling_llama.py:649: Use
rWarning: 1Torch was not compiled with flash attention. (Triggered internally at ..\aten\src\ATen\native\
transformers\cuda\sdp_utils.cpp:455.)
  attn_output = torch.nn.functional.scaled_dot_product_attention(
2024-06-24 19:02:32,291 - modules.ChatTTS.ChatTTS.core - WARNING - Invalid characters found! : {'?'}     
Traceback (most recent call last):
  File "C:\Users\win10\.conda\envs\ChatTTS\Lib\site-packages\gradio\queueing.py", line 532, in process_ev
ents
    response = await route_utils.call_process_api(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\win10\.conda\envs\ChatTTS\Lib\site-packages\gradio\route_utils.py", line 276, in call_pr
ocess_api
    output = await app.get_blocks().process_api(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\win10\.conda\envs\ChatTTS\Lib\site-packages\gradio\blocks.py", line 1928, in process_api
    result = await self.call_function(
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\win10\.conda\envs\ChatTTS\Lib\site-packages\gradio\blocks.py", line 1514, in call_functi
on
    prediction = await anyio.to_thread.run_sync(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\win10\.conda\envs\ChatTTS\Lib\site-packages\anyio\to_thread.py", line 56, in run_sync   
    return await get_async_backend().run_sync_in_worker_thread(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\win10\.conda\envs\ChatTTS\Lib\site-packages\anyio\_backends\_asyncio.py", line 2177, in 
run_sync_in_worker_thread
    return await future
           ^^^^^^^^^^^^
  File "C:\Users\win10\.conda\envs\ChatTTS\Lib\site-packages\anyio\_backends\_asyncio.py", line 859, in r
un
    result = context.run(func, *args)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\win10\.conda\envs\ChatTTS\Lib\site-packages\gradio\utils.py", line 832, in wrapper      
    response = f(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^
  File "C:\Users\win10\.conda\envs\ChatTTS\Lib\site-packages\gradio\utils.py", line 832, in wrapper      
    response = f(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^
  File "C:\Users\win10\.conda\envs\ChatTTS\Lib\site-packages\torch\utils\_contextlib.py", line 115, in de
corate_context
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\win10\Documents\GitHub\ChatTTS-Forge\modules\webui\speaker\speaker_creator.py", line 85,
 in test_spk_voice
    return tts_generate(spk=seed, text=text, progress=progress)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\win10\Documents\GitHub\ChatTTS-Forge\modules\webui\webui_utils.py", line 247, in tts_gen
erate
    handler = TTSHandler(
              ^^^^^^^^^^^
  File "C:\Users\win10\Documents\GitHub\ChatTTS-Forge\modules\api\impl\handler\TTSHandler.py", line 31, i
n __init__
    assert isinstance(spk, Speaker), "spk should be Speaker"
           ^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: spk should be Speaker
Traceback (most recent call last):
  File "C:\Users\win10\.conda\envs\ChatTTS\Lib\site-packages\gradio\queueing.py", line 532, in process_ev
ents
    response = await route_utils.call_process_api(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\win10\.conda\envs\ChatTTS\Lib\site-packages\gradio\route_utils.py", line 276, in call_pr
ocess_api
    output = await app.get_blocks().process_api(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\win10\.conda\envs\ChatTTS\Lib\site-packages\gradio\blocks.py", line 1928, in process_api
    result = await self.call_function(
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\win10\.conda\envs\ChatTTS\Lib\site-packages\gradio\blocks.py", line 1514, in call_functi
on
    prediction = await anyio.to_thread.run_sync(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\win10\.conda\envs\ChatTTS\Lib\site-packages\anyio\to_thread.py", line 56, in run_sync   
    return await get_async_backend().run_sync_in_worker_thread(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\win10\.conda\envs\ChatTTS\Lib\site-packages\anyio\_backends\_asyncio.py", line 2177, in 
run_sync_in_worker_thread
    return await future
           ^^^^^^^^^^^^
  File "C:\Users\win10\.conda\envs\ChatTTS\Lib\site-packages\anyio\_backends\_asyncio.py", line 859, in r
un
    result = context.run(func, *args)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\win10\.conda\envs\ChatTTS\Lib\site-packages\gradio\utils.py", line 832, in wrapper      
    response = f(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^
  File "C:\Users\win10\.conda\envs\ChatTTS\Lib\site-packages\gradio\utils.py", line 832, in wrapper      
    response = f(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^
  File "C:\Users\win10\.conda\envs\ChatTTS\Lib\site-packages\torch\utils\_contextlib.py", line 115, in de
corate_context
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\win10\Documents\GitHub\ChatTTS-Forge\modules\webui\speaker\speaker_creator.py", line 85,
 in test_spk_voice
    return tts_generate(spk=seed, text=text, progress=progress)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\win10\Documents\GitHub\ChatTTS-Forge\modules\webui\webui_utils.py", line 247, in tts_gen
erate
    handler = TTSHandler(
              ^^^^^^^^^^^
  File "C:\Users\win10\Documents\GitHub\ChatTTS-Forge\modules\api\impl\handler\TTSHandler.py", line 31, i
n __init__
    assert isinstance(spk, Speaker), "spk should be Speaker"
           ^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: spk should be Speaker
zhzLuke96 commented 2 months ago

fixed 304c31886bbbcd2a389e66184a21620baadd24dd

WangLaoShi commented 2 months ago

image

出现同样的问题