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

202.160**1 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 70, in run
File "videotrans\task\_stage_recogn.py", line 63, in recogn
File "videotrans\recognition\__init__.py", line 121, in run
File "videotrans\recognition\_base.py", line 99, in run
File "videotrans\recognition\_moss.py", line 56, in _exec
File "videotrans\configure\base.py", line 264, 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

cfg=[TaskCfgVTT]当前工作模式: 翻译视频 单视频模式
原始输入文件名: D:/video/Em bi t kho ng c ch hai ta xuhuong cover.mp4,
输出结果保存到文件夹: D:/video/_video_out/Em bi t kho ng c ch hai ta xuhuong cover-mp4,
临时文件夹: D:/pyVideoTrans/win-pyvideotrans-v4.07/tmp/21652/d58714c3b7
未选 清理已存在
已启用CUDA加速
未选 降噪
语音识别:MOSS-Diarize(内置), , 发音语言: 越南语, 断句方式:LLM重新断句
翻译渠道:智谱AI,原始语言:越南语,目标语言:简体中文, 已选 发送完整字幕
未选 配音角色,不进行配音
字幕: 嵌入硬字幕
代理地址:http://127.0.0.1:10808
video_duration_ms=18433


=
system:Windows-10-10.0.22631-SP0
version:v4.13
frozen:True
language:zh
root_dir:D:/pyVideoTrans/win-pyvideotrans-v4.07

1 Replies

#1 DeepSeek reply at 1 hour ago

这是由于 transformers 库版本过旧,与当前模型所需的 safetensors 版本不兼容导致的。

MOSS-Diarize(内置) 等大模型渠道依赖较新的 transformers 库,而 safetensors 是对应模型权重的底层依赖库。旧版本无法满足新模型要求。

解决方案:

  1. 确认版本:日志中显示通过 win-pyvideotrans-v4.07 目录启动,但版本号显示为 v4.13,说明您使用的是覆盖了补丁包的旧目录。建议先下载最新版的 完整包(非补丁包)解压到新目录中运行,避免旧依赖冲突。
  2. 手动升级依赖(仅源码部署适用):
    在软件目录终端中执行:

    uv add "safetensors>=0.8.0"
    uv sync

    或先卸载后重装:

    uv remove safetensors
    uv add safetensors
    uv sync
  3. 临时回避:若暂时不想处理依赖,可切换语音识别渠道为 faster-whisper(内置)Qwen-ASR(内置),这些渠道不依赖 safetensors 新版本。
注意:Windows 预打包版请不要使用 pip install 命令,会破坏打包环境。请优先使用官方完整包覆盖。

请查阅相关文档:

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