#8640 Subprocess Error: safetensors>=0.8.0 is required for a normal functioning of this module, but found safetensors==0.4.5.T

89.185**7 Posted at: 1 hour ago

Subprocess Error: safetensors>=0.8.0 is required for a normal functioning of this module, but found safetensors==0.4.5.
Try: pip install transformers -U or pip install -e '.[dev]' if you're working with git main
Traceback (most recent call last):
File "videotrans\task\only_one.py", line 71, in run
File "videotrans\task\_stage_recogn.py", line 64, in recogn
File "videotrans\recognition\__init__.py", line 141, in run
File "videotrans\recognition\_base.py", line 101, in run
File "videotrans\recognition\_huggingface.py", line 34, in _exec
File "videotrans\recognition\_huggingface.py", line 70, in _pipe_asr
File "videotrans\configure\base.py", line 277, in _new_process
videotrans.configure.excepts.VideoTransError: Subprocess Error: safetensors>=0.8.0 is required for a normal functioning of this module, but found safetensors==0.4.5.
Try: pip install transformers -U or pip install -e '.[dev]' if you're working with git main

trk=[TransCreate]: uuid='a0e9d1a277', proxy_str='http://127.0.0.1:7897', cfg=[TaskCfgVTT]当前工作模式: 翻译视频 单视频模式
原始输入文件名: D:/下载/下载视频/视频/S01E87.mp4,
输出结果保存到文件夹: D:/下载/下载视频/_video_out/S01E87-mp4,
临时文件夹: D:/下载/下载视频/win-pyvideotrans-v4.05-0711/tmp/6948/a0e9d1a277
已选 清理已存在
未启用CUDA加速
语音识别:Huggingface_ASR(内置), reazon-research/japanese-wav2vec2-large-rs35kh, 发音语言: 日语, ,
翻译渠道:DeepSeek,原始语言:日语,目标语言:简体中文, 已选 发送完整字幕, settings.get('trans_thread')=10, settings.get('aitrans_thread')=50
未选 配音角色,不进行配音
字幕: 嵌入软字幕
代理地址: http://127.0.0.1:7897, precent=4, hasend=False, should_recogn=True, should_trans=True, should_dubbing=False, should_hebing=True, is_copy_video=True, video_codec_num=264, ignore_align=False, is_audio_trans=False, clone_ref='', should_recogn2=False, do_diarize=True
video_duration_ms=3483551


=
system:Windows-10-10.0.22631-SP0
version:v4.17
frozen:True
language:zh_CN
root_dir:D:/下载/下载视频/win-pyvideotrans-v4.05-0711

1 Replies

#1 DeepSeek reply at 1 hour ago

这是因为软件升级时只覆盖了 sp.exe,未完整覆盖依赖库文件夹(_internal 等),导致旧版 safetensors==0.4.5 与新版 transformers 不匹配,Huggingface_ASR 子进程加载失败。

从你的日志可见:程序版本是 v4.17,但安装目录仍是 win-pyvideotrans-v4.05-0711,属于旧目录上打补丁升级。

解决方案(按顺序尝试)

  1. 确认补丁覆盖完整:补丁包内的所有文件和文件夹都必须覆盖到旧版本目录,尤其是 sp.exe、_internal 文件夹、videotrans 文件夹。若只解压覆盖了 sp.exe,必然出现此错。
  2. 清理缓存后再覆盖:在 _internal 文件夹内搜索 __pycache__,将搜到的所有文件和文件夹全部删除,然后重新覆盖一遍补丁包。
  3. 最稳妥做法:直接下载 2.6GB+ 的完整包,解压到全新英文浅层目录(如 D:/pyVideoTrans),把旧的 videotrans/params.json、cfg.json 复制过去保留配置即可。当前 D:/下载/下载视频/... 路径含中文且层级较深,也建议一并改到英文短路径。

补充:本次报错与代理、视频本身无关,纯粹是依赖版本不一致。

请查阅相关文档:

Thinking...
Post Your Reply
If you have more than 50 messages, you will no longer receive an automatic reply. Please ask a new question!
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.

Dondate via ko-fi.com

Related resource