#5962 翻译字幕阶段出错 [Hy-MT2-1.8B(本地内置)] 网络连接失败Traceback (most recent call last):

38.65* Posted at: 20 hours ago

翻译字幕阶段出错 [Hy-MT2-1.8B(本地内置)] 网络连接失败
Traceback (most recent call last):

File "D:\win-videotrans-2.43\_internal\transformers\utils\import_utils.py", line 2096, in getattr

module = self._get_module(self._class_to_module[name])

File "D:\win-videotrans-2.43\_internal\transformers\utils\import_utils.py", line 2290, in _get_module

raise e

File "D:\win-videotrans-2.43\_internal\transformers\utils\import_utils.py", line 2288, in _get_module

return importlib.import_module("." + module_name, self.__name__)

File "importlib\__init__.py", line 126, in import_module

File "", line 1050, in _gcd_import

File "", line 1027, in _find_and_load

File "", line 1006, in _find_and_load_unlocked

File "", line 688, in _load_unlocked

File "", line 883, in exec_module

File "", line 241, in _call_with_frames_removed

File "D:\win-videotrans-2.43\_internal\transformers\integrations\ggml.py", line 23, in

from tokenizers import Tokenizer, d

......
on was the direct cause of the following exception:

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 "D:\win-videotrans-2.43\_internal\transformers\utils\import_utils.py", line 2184, in getattr

raise ModuleNotFoundError(

ModuleNotFoundError: Could not import module 'AutoModelForCausalLM'. Are this object's requirements defined correctly?
cfg=TaskCfgSTS(uuid='f1387e62ea', name='C:/Users/llc/Videos/pyvideotrans/recogn/www.98T.la@1111Customs.21.10.05.Lulu.Chu.Lulu.Does.Naughty.Things.With.Her.Big.Dildo.XXX.2160p.srt', dirname='C:/Users/llc/Videos/pyvideotrans/recogn', noextname='www.98T.la@1111Customs.21.10.05.Lulu.Chu.Lulu.Does.Naughty.Things.With.Her.Big.Dildo.XXX.2160p', basename='www.98T.la@1111Customs.21.10.05.Lulu.Chu.Lulu.Does.Naughty.Things.With.Her.Big.Dildo.XXX.2160p.srt', ext='srt', target_dir='c:/users/llc/videos/pyvideotrans/translate', cache_folder=None, is_cuda=False, source_language=None, source_language_code='English', source_sub='C:/Users/llc/Videos/pyvideotrans/recogn/www.98T.la@1111Customs.21.10.05.Lulu.Chu.Lulu.Does.Naughty.Things.With.Her.Big.Dildo.XXX.2160p.srt', source_wav=None, source_wav_output=None, target_language=None, target_language_code='Simplified Chinese', target_sub='c:/users/llc/videos/pyvideotrans/translate/www.98T.la@1111Customs.21.10.05.Lulu.Chu.Lulu.Does.Naughty.Things.With.Her.Big.Dildo.XXX.2160p.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:D:/win-videotrans-2.43

1 Replies

Hy-MT2-1.8B 翻译渠道报错的核心原因是打包版中内置的 transformers / tokenizers 库版本不兼容,导致 AutoModelForCausalLM 无法加载。

解决方案:

  1. 立即更换翻译渠道(推荐)
    翻译渠道下拉框中切换为 Google翻译微软翻译,它们不依赖本地模型,开箱即用,且翻译质量稳定。
  2. 若坚持使用本地模型,请尝试覆盖最新补丁包:

    • pyVideoTrans 官方文档站下载页 下载最新版本(v4.06 完整包或补丁包)。
    • 将补丁包内的文件覆盖到软件根目录。
    • 注意:覆盖后如果仍报错,可能需要彻底删掉 models/models--tencent--Hy-MT2-1.8B 文件夹,让软件重新下载模型文件。
  3. 彻底清除缓存后重试

    • 关闭软件,删除 videotrans/ 目录下的 cfg.jsonparams.json 文件(会重置所有设置)。
    • 删除 models/models--tencent--Hy-MT2-1.8B 文件夹(重新下载)。
    • 重新启动软件后再试。
提示Hy-MT2-1.8B 是腾讯开源的本地翻译模型,在打包版中因依赖库版本冲突容易失败。强烈建议日常使用在线免费渠道(Google / Microsoft),稳定且高效。

请查阅相关文档:

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