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

2606**6 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 108, in run
File "videotrans\task\_stage_dubbing.py", line 24, in dubbing
File "videotrans\task\_stage_dubbing.py", line 101, in _tts
File "videotrans\tts\__init__.py", line 122, in run
File "videotrans\tts\_base.py", line 98, in run
File "videotrans\tts\_omnivoice.py", line 42, in _exec
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='86d9665738', proxy_str='http://127.0.0.1:7897', cfg=[TaskCfgVTT]当前工作模式: 翻译视频 单视频模式
原始输入文件名: D:/下载/Video/Joby's Electric Air Taxi Joins Texas eVTOL Integration Pilot Program | Electric Skies Tour-(360p24).mp4,
输出结果保存到文件夹: D:/下载/Video/_video_out/Joby's Electric Air Taxi Joins Texas eVTOL Integration Pilot Program | Electric Skies Tour-(360p24)-mp4,
临时文件夹: D:/Ruanjian-m/win-pyvideotrans-v4.08/tmp/12984/86d9665738
已选 清理已存在
已启用CUDA加速
未选 降噪
语音识别:faster-whisper(内置), large-v3, 发音语言: 英语,
翻译渠道:DeepSeek,原始语言:英语,目标语言:简体中文, 已选 发送完整字幕
配音渠道:OmniVoice(内置), 角色:clone, 配音语言:简体中文, 未选 二次语音识别
音量:+0%, 语速:+0%, 已选 音频加速, 未选 视频慢速
已选 移除每条字幕配音开头和结尾静音缓冲
静音移除力度: default
字幕: 嵌入硬字幕
已选 分离人声与背景声, 已选 重新嵌入背景声, 背景音量0.8, 背景声音时长 短于 视频时长时: 拉长(降速播放),存在分离后的纯净人声文件,存在分离后的背景声音文件
代理地址: http://127.0.0.1:7897, precent=15, hasend=False, should_recogn=True, should_trans=True, should_dubbing=True, should_hebing=True, is_copy_video=True, video_codec_num=264, ignore_align=False, is_audio_trans=False, clone_ref='D:/Ruanjian-m/win-pyvideotrans-v4.08/tmp/12984/86d9665738/vocal.wav', should_recogn2=False, do_diarize=True
trk.cfg=[TaskCfgVTT]当前工作模式: 翻译视频 单视频模式
原始输入文件名: D:/下载/Video/Joby's Electric Air Taxi Joins Texas eVTOL Integration Pilot Program | Electric Skies Tour-(360p24).mp4,
输出结果保存到文件夹: D:/下载/Video/_video_out/Joby's Electric Air Taxi Joins Texas eVTOL Integration Pilot Program | Electric Skies Tour-(360p24)-mp4,
临时文件夹: D:/Ruanjian-m/win-pyvideotrans-v4.08/tmp/12984/86d9665738
已选 清理已存在
已启用CUDA加速
未选 降噪
语音识别:faster-whisper(内置), large-v3, 发音语言: 英语,
翻译渠道:DeepSeek,原始语言:英语,目标语言:简体中文, 已选 发送完整字幕
配音渠道:OmniVoice(内置), 角色:clone, 配音语言:简体中文, 未选 二次语音识别
音量:+0%, 语速:+0%, 已选 音频加速, 未选 视频慢速
已选 移除每条字幕配音开头和结尾静音缓冲
静音移除力度: default
字幕: 嵌入硬字幕
已选 分离人声与背景声, 已选 重新嵌入背景声, 背景音量0.8, 背景声音时长 短于 视频时长时: 拉长(降速播放),存在分离后的纯净人声文件,存在分离后的背景声音文件
代理地址: http://127.0.0.1:7897
video_duration_ms=996161


=
system:Windows-10-10.0.26300-SP0
version:v4.15
frozen:True
language:zh
root_dir:D:/Ruanjian-m/win-pyvideotrans-v4.08

1 Replies

#1 DeepSeek reply at 1 hour ago

这是由于升级不完整导致 transformers 版本更新了,但依赖库 safetensors 仍是旧版本(0.4.5),而 transformers 要求 safetensors>=0.8.0。

问题根源:你的软件目录名仍为 win-pyvideotrans-v4.08,说明你是用补丁包覆盖升级到 v4.15 的。补丁包内包含新版 transformers,但旧版 safetensors 被缓存或未正确覆盖,导致版本不匹配。

解决方法(按顺序尝试):

  1. 下载 v4.15 完整包(约 2.7GB),解压到全新英文目录(如 D:\pyVideoTrans),不要仅用补丁包覆盖旧版目录。你的 v4.08 与 v4.15 版本跨度较大,仅覆盖补丁包极易出错。
  2. 若坚持使用补丁包覆盖,请确保:

    • 补丁包中所有文件和文件夹都完整覆盖到旧版目录,尤其是 _internal 文件夹和 videotrans 文件夹,不能只覆盖 sp.exe。
    • 覆盖前,在旧版 _internal 文件夹内搜索所有 __pycache__ 文件夹并删除,避免缓存干扰。
  3. 源码部署用户:执行以下命令更新依赖:

    uv sync

    或使用镜像加速:

    uv sync --index https://mirrors.aliyun.com/pypi/simple/

强烈建议:直接下载 v4.15 完整包解压到全新目录使用,避免因版本跨度过大导致的各类依赖冲突问题。覆盖完成后可保留原有配置文件(videotrans/params.json、cfg.json)以保留你的设置。

请查阅相关文档:

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