Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSError: Error no file named pytorch_model.bin, tf_model.h5, model.ckpt.index or flax_model.msgpack found in directory 报错求助 #836

Open
liujunyang0919 opened this issue Jan 6, 2025 · 1 comment

Comments

@liujunyang0919
Copy link

(cosyvoice) root@iZbp188pe16rhhu1bsrpqoZ:~/CosyVoice# python3 webui.py --port 50000 --model_dir pretrained_models/CosyVoice2-0.5B
2025-01-06 17:12:02,872 - modelscope - INFO - PyTorch version 2.3.1+cu121 Found.
2025-01-06 17:12:02,873 - modelscope - INFO - Loading ast index from /root/.cache/modelscope/ast_indexer
2025-01-06 17:12:02,905 - modelscope - INFO - Loading done! Current index file version is 1.15.0, with md5 63c4f5a3358a622a7ce8ca0c7fa19737 and a total number of 980 components indexed
Traceback (most recent call last):
File "/root/CosyVoice/webui.py", line 187, in
cosyvoice = CosyVoice2(args.model_dir) if 'CosyVoice2' in args.model_dir else CosyVoice(args.model_dir)
File "/root/CosyVoice/cosyvoice/cli/cosyvoice.py", line 133, in init
configs = load_hyperpyyaml(f, overrides={'qwen_pretrain_path': os.path.join(model_dir, 'CosyVoice-BlankEN')})
File "/root/miniconda3/envs/cosyvoice/lib/python3.10/site-packages/hyperpyyaml/core.py", line 188, in load_hyperpyyaml
hparams = yaml.load(yaml_stream, Loader=loader)
File "/root/miniconda3/envs/cosyvoice/lib/python3.10/site-packages/yaml/init.py", line 81, in load
return loader.get_single_data()
File "/root/miniconda3/envs/cosyvoice/lib/python3.10/site-packages/ruamel/yaml/constructor.py", line 116, in get_single_data
return self.construct_document(node)
File "/root/miniconda3/envs/cosyvoice/lib/python3.10/site-packages/ruamel/yaml/constructor.py", line 120, in construct_document
data = self.construct_object(node)
File "/root/miniconda3/envs/cosyvoice/lib/python3.10/site-packages/ruamel/yaml/constructor.py", line 147, in construct_object
data = self.construct_non_recursive_object(node)
File "/root/miniconda3/envs/cosyvoice/lib/python3.10/site-packages/ruamel/yaml/constructor.py", line 188, in construct_non_recursive_object
for _dummy in generator:
File "/root/miniconda3/envs/cosyvoice/lib/python3.10/site-packages/ruamel/yaml/constructor.py", line 633, in construct_yaml_map
value = self.construct_mapping(node)
File "/root/miniconda3/envs/cosyvoice/lib/python3.10/site-packages/ruamel/yaml/constructor.py", line 429, in construct_mapping
return BaseConstructor.construct_mapping(self, node, deep=deep)
File "/root/miniconda3/envs/cosyvoice/lib/python3.10/site-packages/ruamel/yaml/constructor.py", line 244, in construct_mapping
value = self.construct_object(value_node, deep=deep)
File "/root/miniconda3/envs/cosyvoice/lib/python3.10/site-packages/ruamel/yaml/constructor.py", line 147, in construct_object
data = self.construct_non_recursive_object(node)
File "/root/miniconda3/envs/cosyvoice/lib/python3.10/site-packages/ruamel/yaml/constructor.py", line 183, in construct_non_recursive_object
data = constructor(self, tag_suffix, node)
File "/root/miniconda3/envs/cosyvoice/lib/python3.10/site-packages/hyperpyyaml/core.py", line 480, in _construct_object
args, kwargs = _load_node(loader, node)
File "/root/miniconda3/envs/cosyvoice/lib/python3.10/site-packages/hyperpyyaml/core.py", line 434, in _load_node
kwargs = loader.construct_mapping(node, deep=True)
File "/root/miniconda3/envs/cosyvoice/lib/python3.10/site-packages/ruamel/yaml/constructor.py", line 429, in construct_mapping
return BaseConstructor.construct_mapping(self, node, deep=deep)
File "/root/miniconda3/envs/cosyvoice/lib/python3.10/site-packages/ruamel/yaml/constructor.py", line 244, in construct_mapping
value = self.construct_object(value_node, deep=deep)
File "/root/miniconda3/envs/cosyvoice/lib/python3.10/site-packages/ruamel/yaml/constructor.py", line 147, in construct_object
data = self.construct_non_recursive_object(node)
File "/root/miniconda3/envs/cosyvoice/lib/python3.10/site-packages/ruamel/yaml/constructor.py", line 183, in construct_non_recursive_object
data = constructor(self, tag_suffix, node)
File "/root/miniconda3/envs/cosyvoice/lib/python3.10/site-packages/hyperpyyaml/core.py", line 481, in construct_object
return callable
(*args, **kwargs)
File "/root/CosyVoice/cosyvoice/llm/llm.py", line 225, in init
self.model = Qwen2ForCausalLM.from_pretrained(pretrain_path)
File "/root/miniconda3/envs/cosyvoice/lib/python3.10/site-packages/transformers/modeling_utils.py", line 3260, in from_pretrained
raise EnvironmentError(
OSError: Error no file named pytorch_model.bin, tf_model.h5, model.ckpt.index or flax_model.msgpack found in directory pretrained_models/CosyVoice2-0.5B/CosyVoice-BlankEN.

@aluminumbox
Copy link
Collaborator

你模型没下载完,看为什么CosyVoice2-0.5B/CosyVoice-BlankEN这里没东西

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants