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加载模型为下拉菜单报错 #65

Closed klx1204 closed 1 month ago

klx1204 commented 1 month ago

webui.py的GPT-SoVITS模型注释掉了默认模型,改成下拉框选择模型,脚本改动如下:

                    # gpt_path = gr.FileExplorer(root = GPT_SoVITS_ckpt, glob = "*.ckpt", value = "s1bert25hz-2kh-longer-epoch=68e-step=50232.ckpt", file_count='single', label="GPT模型路径")
                    # sovits_path = gr.FileExplorer(root = GPT_SoVITS_ckpt, glob = "*.pth", value = "s2G488k.pth", file_count='single', label="SoVITS模型路径")
                    gpt_path = gr.Dropdown(choices=list_models(GPT_SoVITS_ckpt, 'ckpt'))
                    sovits_path = gr.Dropdown(choices=list_models(GPT_SoVITS_ckpt, '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 471, in load_vits_model
    all_gpt_path, all_sovits_path = os.path.join(GPT_SoVITS_ckpt, gpt_path), os.path.join(GPT_SoVITS_ckpt, sovits_path)
  File "/root/miniconda3/lib/python3.10/posixpath.py", line 90, in join
    genericpath._check_arg_types('join', a, *p)
  File "/root/miniconda3/lib/python3.10/genericpath.py", line 152, in _check_arg_types
    raise TypeError(f'{funcname}() argument must be str, bytes, or '
TypeError: join() argument must be str, bytes, or os.PathLike object, not 'list'

不知是啥原因,求指教,谢谢!

Kedreamix commented 1 month ago

可能这一部分,我们要考虑这个列表是否是权重的路径,可以把list_model的代码贴出来进行研究更为合适