Sign up Log in
n/open-source · 1mo ago · 635 views
u/wuyeeSilver3 YEARS
n/open-sourceu/wuyee 3 YEARS · 1mo ago

Hy-MT2 local offline translation (PotPlayer subtitle / immersive plugin translation)

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)]

  1. 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)
  2. Restart PotPlayer (you can't skip this—it only scans the script directory at startup)
  3. 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.

Translated by AI from 简体中文

6
11
Log into join the discussion.

11 replies

Sort order
  1. syyht Gold 3 YEARS 1mo ago

    Just give it a try.

    Translated by AI from 简体中文

    0
  2. hgth Silver 1mo ago

    Take a look.

    Translated by AI from 简体中文

    0
  3. anjing Gold 1mo ago

    If you're learning a foreign language, give this a try — listen along while reading the bilingual text.

    Translated by AI from 简体中文

    0
  4. ligei Bronze 1mo ago

    True, bilingual subtitles are great for learning a language while listening and reading along, and since it's local and offline you don't have to worry about subtitle content being uploaded.

    Translated by AI from 简体中文

    0
  5. uzi66666666 Gold 3 YEARS 1mo ago

    You could give it a try.

    Translated by AI from 简体中文

    0
  6. _Lance Bronze 1mo ago

    After running the bat, I can't select the source or target language in PotPlayer — both show as garbled Chinese. 🥲 In actual use it can do Japanese to English, but it seems to default to translating into Chinese.

    Translated by AI from 简体中文

    0
  7. wangdd70 Gold 3 YEARS 1mo ago

    Nice find

    Translated by AI from 简体中文

    0
  8. explore Silver 3 YEARS 1mo ago

    Thanks! Let me give it a try.

    Translated by AI from 简体中文

    0
  9. fxz Gold 3 YEARS 1mo ago

    Looks good — any chance there's a Quark Drive link? Baidu without a paid membership is basically dial-up speed.

    Translated by AI from 简体中文

    0
  10. tufei 1mo ago

    Thanks for sharing — would be even better if there were a Quark Drive link too.

    Translated by AI from 简体中文

    0
  11. ASCLL Silver 1mo ago

    Nice, nice.

    Translated by AI from 简体中文

    0