#5932 翻译字幕阶段出错 [Hy-MT2-1.8B(本地内置)] Backend should be defined in the BACKENDS_MAPPING. Offending backend: tensorflow_textTraceb

59.51* Posted at: 10 hours ago

翻译字幕阶段出错 [Hy-MT2-1.8B(本地内置)] Backend should be defined in the BACKENDS_MAPPING. Offending backend: tensorflow_text
Traceback (most recent call last):

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

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

File "videotrans\task\translate_srt.py", line 47, in trans

File "videotrans\translator\_runner.py", line 63, in run

File "videotrans\translator\_base.py", line 68, in run

File "videotrans\translator\_base.py", line 97, in _run_text

File "videotrans\translator\_base.py", line 136, in _hymt2

File "E:\01testtt\pyVideoTrans\_internal\transformers\__init__.py", line 786, in

sys.modules[__name__] = _LazyModule(

File "E:\01testtt\pyVideoTrans\_internal\transformers\utils\import_utils.py", line 2009, in init

raise ValueError(

ValueError: Backend should be defined in the BACKENDS_MAPPING. Offending backend: tensorflow_text
cfg=TaskCfgSTS(uuid='6aaff50807', name='E:/UE5_Top Down RPG/UE5-EN_TopDownRPG/_video_out/190.Rock Projectile-mp4/en.srt', dirname='E:/UE5_Top Down RPG/UE5-EN_TopDownRPG/_video_out/190.Rock Projectile-mp4', noextname='en', basename='en.srt', ext='srt', target_dir='E:/01testtt/pyVideoTrans/output/translate', cache_folder=None, is_cuda=False, source_language=None, source_language_code='English', source_sub='E:/UE5_Top Down RPG/UE5-EN_TopDownRPG/_video_out/190.Rock Projectile-mp4/en.srt', source_wav=None, source_wav_output=None, target_language=None, target_language_code='Simplified Chinese', target_sub='E:/01testtt/pyVideoTrans/output/translate/en.Simplified Chinese.srt', target_wav=None, target_wav_output=None, translate_type=3)


=
system:Windows-10-10.0.19045-SP0
version:v4.06
frozen:True
language:zh
root_dir:E:/01testtt/pyVideoTrans

1 Replies

这是 Hy-MT2-1.8B 本地模型依赖缺失导致的错误。模型需要 tensorflow-text 后端,但当前环境未正确加载。

解决办法:

  1. 切换翻译渠道:暂时改用 M2M100 本地翻译或 微软翻译(免费无需配置),避免此依赖问题。
  2. 重新下载模型:删除 软件目录/models/models--tencent--Hy-MT2-1.8B/ 文件夹,再次使用时软件会自动重新下载完整模型文件。
  3. 检查安装完整性:如果是源码部署,确保运行了 uv sync --all-extrasuv sync 完整安装了所有依赖。

相关文档

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.

Dondate via ko-fi.com

Dondate via PayPal

Related resource