#3323 OSError: Error no file named pytorch_model.bin, model.safetensors, tf_model.h5, model.ckpt.index or flax_model.msgpack f

2409:8a38* Posted at: 20 hours ago 👁16

Traceback (most recent call last):
File "videotrans\process\stt_fun.py", line 351, in pipe_asr
File "transformers\pipelines\__init__.py", line 1027, in pipeline

framework, model = infer_framework_load_model(

File "transformers\pipelines\base.py", line 333, in infer_framework_load_model

raise ValueError(

ValueError: Could not load model D:/win-pyvideotrans-v3.97/models/models--nvidia--parakeet-ctc-1.1b with any of the following classes: (, , ). See the original errors:

while loading with AutoModelForCTC, an error is thrown:
Traceback (most recent call last):
File "transformers\pipelines\base.py", line 293, in infer_framework_load_model

model = model_class.from_pretrained(model, **kwargs)

File "transformers\models\auto\auto_factory.py", line 604, in from_pretrained

return model_class.from_pretrained(

File "transformers\modeling_utils.py", line 277, in _wrapper

return func(*args, **kwargs)

File "transformers\modeling_utils.py", line 4900,
......
exception occurred:

Traceback (most recent call last):
File "transformers\pipelines\base.py", line 311, in infer_framework_load_model

model = model_class.from_pretrained(model, **fp32_kwargs)

File "transformers\models\auto\auto_factory.py", line 604, in from_pretrained

return model_class.from_pretrained(

File "transformers\modeling_utils.py", line 277, in _wrapper

return func(*args, **kwargs)

File "transformers\modeling_utils.py", line 4900, in from_pretrained

checkpoint_files, sharded_metadata = _get_resolved_checkpoint_files(

File "transformers\modeling_utils.py", line 989, in _get_resolved_checkpoint_files

raise OSError(

OSError: Error no file named pytorch_model.bin, model.safetensors, tf_model.h5, model.ckpt.index or flax_model.msgpack found in directory D:/win-pyvideotrans-v3.97/models/models--nvidia--parakeet-ctc-1.1b.

while loading with AutoModelForSpeechSeq2Seq, an error is thrown:
Traceback (most recent call last):
File "transformers\pipelines\base.py", line 293, in infer_framework_load_model

model = model_class.from_pretrained(model, **kwargs)

File "transformers\models\auto\auto_factory.py", line 607, in from_pretrained

raise ValueError(

ValueError: Unrecognized configuration class for this kind of AutoModel: AutoModelForSpeechSeq2Seq.
Model type should be one of DiaConfig, GraniteSpeechConfig, KyutaiSpeechToTextConfig, MoonshineConfig, Pop2PianoConfig, SeamlessM4TConfig, SeamlessM4Tv2Config, SpeechEncoderDecoderConfig, Speech2TextConfig, SpeechT5Config, WhisperConfig.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "transformers\pipelines\base.py", line 311, in infer_framework_load_model

model = model_class.from_pretrained(model, **fp32_kwargs)

File "transformers\models\auto\auto_factory.py", line 607, in from_pretrained

raise ValueError(

ValueError: Unrecognized configuration class for this kind of AutoModel: AutoModelForSpeechSeq2Seq.
Model type should be one of DiaConfig, GraniteSpeechConfig, KyutaiSpeechToTextConfig, MoonshineConfig, Pop2PianoConfig, SeamlessM4TConfig, SeamlessM4Tv2Config, SpeechEncoderDecoderConfig, Speech2TextConfig, SpeechT5Config, WhisperConfig.

while loading with ParakeetForCTC, an error is thrown:
Traceback (most recent call last):
File "transformers\pipelines\base.py", line 293, in infer_framework_load_model

model = model_class.from_pretrained(model, **kwargs)

File "transformers\modeling_utils.py", line 277, in _wrapper

return func(*args, **kwargs)

File "transformers\modeling_utils.py", line 4900, in from_pretrained

checkpoint_files, sharded_metadata = _get_resolved_checkpoint_files(

File "transformers\modeling_utils.py", line 989, in _get_resolved_checkpoint_files

raise OSError(

OSError: Error no file named pytorch_model.bin, model.safetensors, tf_model.h5, model.ckpt.index or flax_model.msgpack found in directory D:/win-pyvideotrans-v3.97/models/models--nvidia--parakeet-ctc-1.1b.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "transformers\pipelines\base.py", line 311, in infer_framework_load_model

model = model_class.from_pretrained(model, **fp32_kwargs)

File "transformers\modeling_utils.py", line 277, in _wrapper

return func(*args, **kwargs)

File "transformers\modeling_utils.py", line 4900, in from_pretrained

checkpoint_files, sharded_metadata = _get_resolved_checkpoint_files(

File "transformers\modeling_utils.py", line 989, in _get_resolved_checkpoint_files

raise OSError(

OSError: Error no file named pytorch_model.bin, model.safetensors, tf_model.h5, model.ckpt.index or flax_model.msgpack found in directory D:/win-pyvideotrans-v3.97/models/models--nvidia--parakeet-ctc-1.1b.


=
system:Windows-10-10.0.19043-SP0
version:v3.97
frozen:True
language:zh
root_dir:D:/win-pyvideotrans-v3.97

1 Replies

这是由于 HuggingFace 模型文件下载不完整或缺失导致的。软件在 D:/win-pyvideotrans-v3.97/models/models--nvidia--parakeet-ctc-1.1b 目录下找不到模型权重文件(如 pytorch_model.binmodel.safetensors)。

解决方案:

  1. 手动下载模型文件:由于 HuggingFace 在国内访问困难,需要手动下载模型。
  2. 获取模型:访问 HuggingFace 模型页面 https://huggingface.co/nvidia/parakeet-ctc-1.1b。如果无法访问,请使用镜像站(如 hf-mirror.com)或寻求他人帮助下载。
  3. 放置模型文件:将下载到的模型权重文件(通常是 pytorch_model.binmodel.safetensors)以及 config.json 等配置文件,放入 D:/win-pyvideotrans-v3.97/models/models--nvidia--parakeet-ctc-1.1b 目录中。确保文件直接位于该文件夹内,而不是嵌套的子文件夹里。
  4. 重新尝试:关闭软件后重新启动,再次使用该语音识别模型。

如果问题持续,建议暂时使用其他语音识别渠道,如 faster-whisperEdge-TTS(如果支持识别)。

请查阅相关文档:

Post Your Reply
Open source and free maintenance is not easy. If this project is helpful to you, please consider making a small donation to help the project continue to maintain and update.

Related resource

Similar issues already exist