[index-tts]网络连接不到https://huggingface.co

2025-10-28 725 views
2

Traceback (most recent call last): File "/root/cs/index-tts-2/webui.py", line 55, in tts = IndexTTS2(model_dir=cmd_args.model_dir, File "/root/cs/index-tts-2/indextts/infer_v2.py", line 113, in init self.semantic_model, self.semantic_mean, self.semantic_std = build_semantic_model( File "/root/cs/index-tts-2/indextts/utils/maskgct_utils.py", line 88, in build_semantic_model semantic_model = Wav2Vec2BertModel.from_pretrained("facebook/w2v-bert-2.0") File "/root/cs/index-tts-2/.venv/lib/python3.10/site-packages/transformers/modeling_utils.py", line 308, in _wrapper return func(*args, kwargs) File "/root/cs/index-tts-2/.venv/lib/python3.10/site-packages/transformers/modeling_utils.py", line 4364, in from_pretrained config, model_kwargs = cls.config_class.from_pretrained( File "/root/cs/index-tts-2/.venv/lib/python3.10/site-packages/transformers/configuration_utils.py", line 555, in from_pretrained config_dict, kwargs = cls.get_config_dict(pretrained_model_name_or_path, kwargs) File "/root/cs/index-tts-2/.venv/lib/python3.10/site-packages/transformers/configuration_utils.py", line 595, in get_config_dict config_dict, kwargs = cls._get_config_dict(pretrained_model_name_or_path, kwargs) File "/root/cs/index-tts-2/.venv/lib/python3.10/site-packages/transformers/configuration_utils.py", line 654, in _get_config_dict resolved_config_file = cached_file( File "/root/cs/index-tts-2/.venv/lib/python3.10/site-packages/transformers/utils/hub.py", line 312, in cached_file file = cached_files(path_or_repo_id=path_or_repo_id, filenames=[filename], kwargs) File "/root/cs/index-tts-2/.venv/lib/python3.10/site-packages/transformers/utils/hub.py", line 543, in cached_files raise OSError( OSError: We couldn't connect to 'https://huggingface.co' to load the files, and couldn't find them in the cached files. Checkout your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/transformers/installation#offline-mode'.

回答

9

使用end_point:"https://hf-mirror.com"

Traceback (most recent call last):
  File "/data/coding/index-tts/webui.py", line 56, in <module>
    tts = IndexTTS2(model_dir=cmd_args.model_dir,
  File "/data/coding/index-tts/indextts/infer_v2.py", line 111, in __init__
    self.extract_features = SeamlessM4TFeatureExtractor.from_pretrained("facebook/w2v-bert-2.0")
  File "/data/coding/index-tts/.venv/lib/python3.10/site-packages/transformers/feature_extraction_utils.py", line 384, in from_pretrained
    feature_extractor_dict, kwargs = cls.get_feature_extractor_dict(pretrained_model_name_or_path, **kwargs)
  File "/data/coding/index-tts/.venv/lib/python3.10/site-packages/transformers/feature_extraction_utils.py", line 510, in get_feature_extractor_dict
    resolved_feature_extractor_file = cached_file(
  File "/data/coding/index-tts/.venv/lib/python3.10/site-packages/transformers/utils/hub.py", line 312, in cached_file
    file = cached_files(path_or_repo_id=path_or_repo_id, filenames=[filename], **kwargs)
  File "/data/coding/index-tts/.venv/lib/python3.10/site-packages/transformers/utils/hub.py", line 543, in cached_files
    raise OSError(
OSError: We couldn't connect to 'https://hf-mirror.com' to load the files, and couldn't find them in the cached files.
Checkout your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/transformers/installation#offline-mode'.
root@cdnrsspcevkohnhk-snow-95fccf94b-mcslk:/data/coding# ping hf-mirror.com
PING hf-mirror.com (160.16.86.14) 56(84) bytes of data.
64 bytes from 160.16.86.14: icmp_seq=1 ttl=43 time=78.8 ms
64 bytes from 160.16.86.14: icmp_seq=2 ttl=43 time=78.3 ms
64 bytes from 160.16.86.14: icmp_seq=3 ttl=43 time=78.8 ms