#7902 Error during TTS dubbing stage [Confucius4(Built-in)] Subprocess Error: cannot import name 'TensorSpec' from 'safetensor

188.192**8 Posted at: 2 hours ago

Error during TTS dubbing stage [Confucius4(Built-in)] Subprocess Error: cannot import name 'TensorSpec' from 'safetensors._safetensors_rust' (C:\vTrans\_internal\safetensors\_safetensors_rust.cp310-win_amd64.pyd)
Traceback (most recent call last):

File "videotrans\task\job.py", line 35, in run

File "videotrans\task\job.py", line 155, in process_task

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\_confuciustts.py", line 37, in _exec

File "videotrans\configure\base.py", line 277, in _new_process

videotrans.configure.excepts.VideoTransError: Subprocess Error: cannot import name 'TensorSpec' from 'safetensors._safetensors_rust' (C:\vTrans\_internal\safetensors\_safetensors_rust.cp310-win_amd64.pyd)
trk=[TransCreate]: uuid='4f506cc304', proxy_str=None, cfg=[TaskCfgVTT]当前工作模式: 翻译视频 批量翻译模式 每批1个
原始输入文件名: C:/Private Filez/Videoz/Zum Übertragen/Dubbing/Dubprogress/10000000_632648081224319_458868234824111877_n.mp4,
输出结果保存到文件夹: C:/Private Filez/Videoz/Zum Übertragen/Dubbing/Dubprogress/10000000_632648081224319_458868234824111877_n-mp4,
临时文件夹: C:/vTrans/tmp/35896/4f506cc304
未选 清理已存在
已启用CUDA加速
已选 降噪
已选 识别说话人,最大说话人数量不限制
STT Service:openai-whisper(Built-in), large-v3-turbo, 发音语言: English,
TranslateSrt:Local LLM (OpenAI-compatible),原始语言:English,目标语言:German, 未选 SendSRT
TTS Service:Confucius4(Built-in), 角色:clone, 配音语言:German, 未选 二次语音识别
音量:-1%, 语速:+0%, 已选 音频加速, 未选 视频慢速
已选 移除每条字幕配音开头和结尾静音缓冲
静音移除力度: default
字幕: No Subtitles
已选 分离人声与背景声, 已选 重新嵌入背景声, 背景音量0.8, 背景声音时长 短于 视频时长时: 拉长(降速播放),存在分离后的纯净人声文件,存在分离后的背景声音文件, 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='C:/vTrans/tmp/35896/4f506cc304/vocal.wav', should_recogn2=False, do_diarize=False


=
system:Windows-10-10.0.26300-SP0
version:v4.15
frozen:True
language:en_US
root_dir:C:/vTrans

1 Replies

#1 DeepSeek reply at 2 hours ago

The core cause is a corrupted/mismatched safetensors library: the Confucius4(Built-in) TTS engine requires a newer safetensors version that defines TensorSpec, but the packaged _safetensors_rust.cp310-win_amd64.pyd in your _internal folder does not contain it. This typically happens when only sp.exe was overwritten (partial patch) instead of all files/folders in the patch/full package, or when stale __pycache__ files remain.

Steps to fix:

  1. Re-download the v4.15 patch package and overwrite the entire contents onto your existing installation — not just sp.exe. Ensure at least the _internal folder and videotrans folder are fully replaced. Even if you already have the v4.15 full package, re-applying the latest patch is still required (known issue in this release cycle).
  2. Before overwriting, clean stale caches: search inside C:\vTrans\_internal for every __pycache__ folder and delete all of them, then apply the patch/full package.
  3. Relaunch sp.exe and retry the Confucius4 dubbing task.
  4. If the error persists after a full overwrite, delete the tmp/ cache under C:\vTrans\ and retry.

Note: the error originates from the safetensors runtime inside the packaged app, not from your task settings — no configuration change is needed; this is purely an installation/update integrity issue.

请查阅相关文档:

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