Kedreamix / Linly-Talker

Digital Avatar Conversational System - Linly-Talker. 😄✨ Linly-Talker is an intelligent AI system that combines large language models (LLMs) with visual models to create a novel human-AI interaction method. 🤝🤖 It integrates various technologies like Whisper, Linly, Microsoft Speech Services, and SadTalker talking head generation system. 🌟🔬
https://kedreamix.github.io/
MIT License
1.67k stars 281 forks source link

AutoDL加载自训练GPT-SoVITS模型报错 #66

Closed klx1204 closed 1 month ago

klx1204 commented 1 month ago

webui.py脚本修改成使用textbox

                    gpt_path = gr.Textbox(label="GPT模型路径", 
                                          value="s1bert25hz-2kh-longer-epoch=68e-step=50232.ckpt")
                    sovits_path = gr.Textbox(label="SoVITS模型路径", 
                                             value="s2G488k.pth")

加载默认模型正常

模型加载中... s1bert25hz-2kh-longer-epoch=68e-step=50232.ckpt s2G488k.pth
Number of parameter: 77.49M
<All keys matched successfully>

改为加载通过GPT-SoVITS训练出的模型报错

模型加载中... yk-e15.ckpt yk_e8_s224.pth
Traceback (most recent call last):
  File "/root/miniconda3/lib/python3.10/site-packages/gradio/queueing.py", line 495, in call_prediction
    output = await route_utils.call_process_api(
  File "/root/miniconda3/lib/python3.10/site-packages/gradio/route_utils.py", line 232, in call_process_api
    output = await app.get_blocks().process_api(
  File "/root/miniconda3/lib/python3.10/site-packages/gradio/blocks.py", line 1561, in process_api
    result = await self.call_function(
  File "/root/miniconda3/lib/python3.10/site-packages/gradio/blocks.py", line 1179, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "/root/miniconda3/lib/python3.10/site-packages/anyio/to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
  File "/root/miniconda3/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 2134, in run_sync_in_worker_thread
    return await future
  File "/root/miniconda3/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 851, in run
    result = context.run(func, *args)
  File "/root/miniconda3/lib/python3.10/site-packages/gradio/utils.py", line 695, in wrapper
    response = f(*args, **kwargs)
  File "/root/miniconda3/lib/python3.10/site-packages/gradio/utils.py", line 695, in wrapper
    response = f(*args, **kwargs)
  File "/root/Linly-Talker/webui.py", line 472, in load_vits_model
    vits.load_model(all_gpt_path, all_sovits_path)
  File "/root/Linly-Talker/VITS/GPT_SoVITS.py", line 329, in load_model
    dict_s1 = torch.load(gpt_path, map_location="cpu")
  File "/root/miniconda3/lib/python3.10/site-packages/torch/serialization.py", line 1028, in load
    return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
  File "/root/miniconda3/lib/python3.10/site-packages/torch/serialization.py", line 1231, in _legacy_load
    return legacy_load(f)
  File "/root/miniconda3/lib/python3.10/site-packages/torch/serialization.py", line 1117, in legacy_load
    tar.extract('storages', path=tmpdir)
  File "/root/miniconda3/lib/python3.10/tarfile.py", line 2091, in extract
    tarinfo = self.getmember(member)
  File "/root/miniconda3/lib/python3.10/tarfile.py", line 1813, in getmember
    raise KeyError("filename %r not found" % name)
KeyError: "filename 'storages' not found"

求指导,谢谢!

Kedreamix commented 1 month ago

你好,我觉得来说,有可能是对应的路径的问题,建议是在加载模型的时候打印一些权重的路径,看看是否是匹配的。我觉得这样修改的方法是正确的,但是可能在路径或者一些版本上存在一些问题 当然,我还是更加建议使用我webui里面的方式,因为通过路径查找更加方便简单