Thanks to zxcvb1234363 on the 52pojie forum for sharing; original link: https://www.52pojie.cn/thread-2135102-1-5.html
Open-source project: https://github.com/Tencent-Hunyuan/Hy-MT2
Hy-MT2 local subtitle translation (PotPlayer only)
[What is this]
Run Tencent's open-source Hy-MT2-1.8B translation model on your own PC and let PotPlayer's real-time subtitle translation use the local model: no internet, no cost, and subtitle content is never uploaded.
[How to use (three steps)]
- Double-click install.bat
- Installs the translation script into PotPlayer automatically
- Sets it to auto-start on boot automatically
- Starts the local service automatically (first load takes a few seconds)
- Restart PotPlayer (you can't skip this—it only scans the script directory at startup)
- Open a video and load an external subtitle (.srt / .ass)
Right-click → Subtitles → Real-time subtitle translation → Hy-MT2 local translation
Set source language to "English" and target language to "Simplified Chinese"
[Distributing to other PCs]
Copy the whole folder over (about 1.2 GB) and double-click install.bat.
It can go in any path; the script locates things relative to its own location, so no config changes needed.
[Folder layout]
llama\ inference engine (llama.cpp Vulkan build)
models\ model Hy-MT2-1.8B-Q4_K_M.gguf (1.06 GB)
potplayer\ PotPlayer translation script
start-server.vbs Starts the service silently (this is what's used for auto-start)
start-server-debug.bat Starts with a window, for troubleshooting/logs
install.bat Installer
uninstall.bat Uninstaller
[Performance notes]
Test machine: Ryzen 5 1600 + GTX 1050 Ti 4GB
Single subtitle line: 0.1–0.4 sec
Generation speed: 30–38 tok/s
VRAM usage: about 1.1 GB
[Hardware requirements]
- GPU supports Vulkan (basically all discrete/integrated GPUs from the last ten years do)
- 2 GB+ VRAM
- If you don't have a discrete GPU, change -ngl 99 to -ngl 0 to run on CPU, but it'll be 3–5× slower
(change it in both start-server.vbs and start-server-debug.bat)
[Port]
Default is 18080 (to avoid the usual 8080 conflicts). If you still need to change it, update all three places:
start-server.vbs
start-server-debug.bat
potplayer\SubtitleTranslate - HyMT2.as
[FAQ]
Q: I selected Hy-MT2 but subtitles aren't turning into Chinese
A: First check that the service is running—open http://127.0.0.1:18080/health in a browser.
It should return {"status":"ok"}. If not, double-click start-server.vbs;
if that still doesn't work, start it with start-server-debug.bat and check the error in the window.
Q: I can't find "Hy-MT2 local translation" in the subtitle menu
A: PotPlayer has to be restarted to scan new scripts. Also make sure the Translate directory path printed by install.bat matches the PotPlayer you're actually using.
Q: Translation quality is just okay
A: 1.8B is a small on-device model. It does great on short sentences, medical terms, and technical vocabulary;
fixed idioms tend to be translated literally, and elliptical sentences can sound stiff. If you need better, go for 7B, but that needs 5GB+ VRAM.
Q: I want to disable auto-start on boot
A: Delete Hy-MT2 Translate Server.lnk from
%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\
Q: It uses VRAM while watching videos and affects gaming
A: When you're not using it, end llama-server.exe in Task Manager, or use uninstall.bat to remove auto-start.
[License]
Hy-MT2 model weights: apache-2.0 (ModelScope / HuggingFace model card)
llama.cpp: MIT
Download link:
File shared via Baidu Netdisk: HyMT2.zip Link: https://pan.baidu.com/s/1YayBXzuSwKLVEs56qV6HlQ?pwd=52pj Extraction code: 52pj
Thanks again to the OP.
感谢吾爱论坛**zxcvb1234363大佬的分享,源链接**:https://www.52pojie.cn/thread-2135102-1-5.html
开源项目:https://github.com/Tencent-Hunyuan/Hy-MT2
Hy-MT2 本地字幕翻译(PotPlayer 专用)
【这是什么】
把腾讯开源的 Hy-MT2-1.8B 翻译模型跑在你自己的电脑上,让 PotPlayer
的实时字幕翻译用本地模型:不需要联网、不花钱、字幕内容不上传。
【怎么用(三步)】
- 双击 install.bat
- 自动把翻译脚本装进 PotPlayer
- 自动设置开机启动
- 自动启动本地服务(首次加载等几秒)
- 重启 PotPlayer(这一步不能省,它只在启动时扫描脚本目录)
- 打开视频并加载外挂字幕(.srt / .ass)
右键 → 字幕 → 实时字幕翻译 → Hy-MT2 本地翻译
源语言选「英语」,目标语言选「简体中文」
【分发到其他电脑】
整个文件夹拷过去(约 1.2 GB),双击 install.bat 即可。
放在任何路径都行,脚本按自身所在位置定位,不需要改配置。
【目录说明】
llama\ 推理引擎(llama.cpp Vulkan 版)
models\ 模型 Hy-MT2-1.8B-Q4_K_M.gguf(1.06 GB)
potplayer\ PotPlayer 翻译脚本
start-server.vbs 静默启动服务(开机自启用的就是它)
start-server-debug.bat 带窗口启动,排错看日志用
install.bat 安装
uninstall.bat 卸载
【性能参考】
测试机:Ryzen 5 1600 + GTX 1050 Ti 4GB
单条字幕翻译 0.1–0.4 秒
生成速度 30–38 tok/s
显存占用约 1.1 GB
【硬件要求】
- 显卡支持 Vulkan(近十年的独显/核显基本都支持)
- 显存 2 GB 以上
- 没有独显可把 -ngl 99 改成 -ngl 0 走 CPU,但会慢 3–5 倍
(改 start-server.vbs 和 start-server-debug.bat 两处)
【端口】
默认 18080(避开常见的 8080 冲突)。如仍要改,需同时改三处:
start-server.vbs
start-server-debug.bat
potplayer\SubtitleTranslate - HyMT2.as
【常见问题】
Q: 选了 Hy-MT2 但字幕没变成中文
A: 先确认服务在跑 —— 浏览器打开 http://127.0.0.1:18080/health
正常应返回 {"status":"ok"}。没返回就双击 start-server.vbs;
还不行用 start-server-debug.bat 启动,看窗口里的报错。
Q: 字幕菜单里找不到「Hy-MT2 本地翻译」
A: PotPlayer 必须重启才会扫描新脚本。另外确认 install.bat 输出的
Translate 目录路径,和你实际用的 PotPlayer 是同一个。
Q: 翻译质量一般
A: 1.8B 是端侧小模型。短句、医学术语、技术词汇表现很好;
固定习语容易直译,省略句偏生硬。要更高需要换 7B,但需 5GB+ 显存。
Q: 想关掉开机自启
A: 删除 %APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\
下的 Hy-MT2 Translate Server.lnk
Q: 看片时占显存影响玩游戏
A: 不用时在任务管理器结束 llama-server.exe,或用 uninstall.bat 移除自启。
【许可】
Hy-MT2 模型权重:apache-2.0(ModelScope / HuggingFace 模型卡)
llama.cpp:MIT
下载地址:
通过网盘分享的文件:HyMT2.zip链接: https://pan.baidu.com/s/1YayBXzuSwKLVEs56qV6HlQ?pwd=52pj 提取码: 52pj
再次感谢这位大佬
Translated by AI from 简体中文Original (简体中文)
11 replies
Sort order