FunAudioLLM / CosyVoice

Multi-lingual large voice generation model, providing inference, training and deployment full-stack ability.
https://funaudiollm.github.io/
Apache License 2.0
5.93k stars 635 forks source link

搭建好环境后运行“python3 webui.py --port 50000 --model_dir pretrained_models/CosyVoice-300M”报以下错误 #123

Open tangjinhan opened 3 months ago

tangjinhan commented 3 months ago

搭建好环境后运行“python3 webui.py --port 50000 --model_dir pretrained_models/CosyVoice-300M”报以下错误,

Traceback (most recent call last): File "/home/fm2024/tang/CosyVoice/webui.py", line 30, in from cosyvoice.cli.cosyvoice import CosyVoice File "/home/fm2024/tang/CosyVoice/cosyvoice/cli/cosyvoice.py", line 17, in from modelscope import snapshot_download File "/home/fm2024/miniconda3/envs/cosyvoice/lib/python3.10/site-packages/modelscope/init.py", line 4, in from modelscope.utils.import_utils import (LazyImportModule, File "/home/fm2024/miniconda3/envs/cosyvoice/lib/python3.10/site-packages/modelscope/utils/init.py", line 1, in from .hub import create_model_if_not_exist, read_config File "/home/fm2024/miniconda3/envs/cosyvoice/lib/python3.10/site-packages/modelscope/utils/hub.py", line 12, in from modelscope.utils.config import Config File "/home/fm2024/miniconda3/envs/cosyvoice/lib/python3.10/site-packages/modelscope/utils/config.py", line 22, in from modelscope.utils.import_utils import import_modules_from_file File "/home/fm2024/miniconda3/envs/cosyvoice/lib/python3.10/site-packages/modelscope/utils/import_utils.py", line 380, in class LazyImportModule(ModuleType): File "/home/fm2024/miniconda3/envs/cosyvoice/lib/python3.10/site-packages/modelscope/utils/import_utils.py", line 383, in LazyImportModule AST_INDEX = load_index() File "/home/fm2024/miniconda3/envs/cosyvoice/lib/python3.10/site-packages/modelscope/utils/ast_utils.py", line 723, in load_index _update_index(index, files_mtime) File "/home/fm2024/miniconda3/envs/cosyvoice/lib/python3.10/site-packages/modelscope/utils/ast_utils.py", line 639, in _update_index updated_index = file_scanner.get_files_scan_results(updated_files) File "/home/fm2024/miniconda3/envs/cosyvoice/lib/python3.10/site-packages/modelscope/utils/ast_utils.py", line 533, in get_files_scan_results decorator_list, import_list = self._get_single_file_scan_result( File "/home/fm2024/miniconda3/envs/cosyvoice/lib/python3.10/site-packages/modelscope/utils/ast_utils.py", line 470, in _get_single_file_scan_result raise Exception( Exception: During ast indexing the file /home/fm2024/miniconda3/envs/cosyvoice/lib/python3.10/site-packages/modelscope/models/nlp/llama/backbone.py, a related error excepted in the file /home/fm2024/miniconda3/envs/cosyvoice/lib/python3.10/site-packages/modelscope/utils/ast_utils.py at line: 152: "attr = getattr(node, field)" with error msg: "AttributeError: 'ClassDef' object has no attribute 'type_params'", please double check the origin file /home/fm2024/miniconda3/envs/cosyvoice/lib/python3.10/site-packages/modelscope/models/nlp/llama/backbone.py to see whether the file is correctly edited.

zhanbei1 commented 3 months ago

不知道这是否和你的环境有关,我记得这个README.md的操作步骤中使用的是python3.8的版本,你的报错中竟然是3.10的版本,是否严格按照所给的步骤进行操作呢??

zyw-2003 commented 2 months ago

我这也是这个错。。。都不知道该怎么办,而且明明是用的3.8的版本