jianchang512 / ChatTTS-ui

一个简单的本地网页界面,使用ChatTTS将文字合成为语音,同时支持对外提供API接口。A simple native web interface that uses ChatTTS to synthesize text into speech, along with support for external API interfaces.
https://pyvideotrans.com
Other
6.16k stars 713 forks source link

使用1.0版本整合包时出现了错误,然而旧版本没有这种错误 #219

Open NoOneWannaDieTooFast opened 2 months ago

NoOneWannaDieTooFast commented 2 months ago

操作是从启动app.exe到执行第一次声音合成

Starting... 2024-08-08 23:20:32,817 - modelscope - INFO - PyTorch version 2.1.2+cu118 Found. 2024-08-08 23:20:32,818 - modelscope - INFO - Loading ast index from C:\Users\用户名.cache\modelscope\ast_indexer 2024-08-08 23:20:32,845 - modelscope - INFO - Loading done! Current index file version is 1.14.0, with md5 d41d8cd98f00b204e9800998ecf8427e and a total number of 0 components indexed {'sha256_asset_Decoder_pt': '9964e36e840f0e3a748c5f716fe6de6490d2135a5f5155f4a642d51860e2ec38', 'sha256_asset_DVAE_full_pt': '553eb75763511e23f3e5f86303e2163c5ca775489d637fb635d979c8ae58bbe5', 'sha256_asset_GPT_pt': 'd7d4ee6461ea097a2be23eb40d73fb94ad3b3d39cb64fbb50cb3357fd466cadb', 'sha256_asset_spk_stat_pt': '3228d8a4cbbf349d107a1b76d2f47820865bd3c9928c4bdfe1cefd5c7071105f', 'sha256_asset_tokenizer_pt': 'e911ae7c6a7c27953433f35c44227a67838fe229a1f428503bdb6cd3d1bcc69c', 'sha256_asset_Vocos_pt': '09a670eda1c08b740013679c7a90ebb7f1a97646ea7673069a6838e6b51d6c58'} check models in custom path E:/AIGC voice&video/win-ChatTTS-ui-v1.0 failed. Start:127.0.0.1:9966 voice='2000' 当前使用音色:根据seed=2000获取随机音色 [2024-08-08 23:21:11,882] ERROR in app: Exception on /tts [POST] Traceback (most recent call last): File "flask\app.py", line 1473, in wsgi_app File "flask\app.py", line 882, in full_dispatch_request File "flask\app.py", line 880, in full_dispatch_request File "flask\app.py", line 865, in dispatch_request File "app.py", line 194, in tts File "ChatTTS\core.py", line 161, in sample_random_speaker AttributeError: 'Chat' object has no attribute 'tokenizer' ERROR:app:Exception on /tts [POST] Traceback (most recent call last): File "flask\app.py", line 1473, in wsgi_app File "flask\app.py", line 882, in full_dispatch_request File "flask\app.py", line 880, in full_dispatch_request File "flask\app.py", line 865, in dispatch_request File "app.py", line 194, in tts File "ChatTTS\core.py", line 161, in sample_random_speaker AttributeError: 'Chat' object has no attribute 'tokenizer'

0.84版的整合包就没有这种错误:

2024-08-08 23:39:29,175 - modelscope - INFO - PyTorch version 2.3.0+cu118 Found. 2024-08-08 23:39:29,177 - modelscope - INFO - Loading ast index from C:\Users\用户名.cache\modelscope\ast_indexer 2024-08-08 23:39:29,295 - modelscope - INFO - Loading done! Current index file version is 1.14.0, with md5 d41d8cd98f00b204e9800998ecf8427e and a total number of 0 components indexed INFO:ChatTTS.core:Load from local: E:/AIGC voice&video/ChatTTS-UI-0.84/models\pzc163\chatTTS INFO:ChatTTS.core:use cuda:0 INFO:ChatTTS.core:vocos loaded. INFO:ChatTTS.core:dvae loaded. INFO:ChatTTS.core:gpt loaded. INFO:ChatTTS.core:decoder loaded. INFO:ChatTTS.core:tokenizer loaded. INFO:ChatTTS.core:All initialized. 启动:127.0.0.1:9966 voice=2000,custom_voice=2000 根据seed=2000获取随机音色 result=['你说得对。'],len=1 0%| | 0/384 [00:00<?, ?it/s]transformers\models\llama\modeling_llama.py:649: UserWarning: 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( 2%|█▉ | 9/384 [00:02<01:29, 4.20it/s] 3%|██▏ | 56/2048 [00:01<00:56, 35.23it/s] 推理时长: 6.54 秒 音频时长: 1.18 秒

jianchang512 commented 2 months ago

https://github.com/jianchang512/ChatTTS-ui/issues/215