ComfyUI Extension
ComfyUI-HY-MT
The ComfyUI node version translated by HY-MT1.5
starsFriday/ComfyUI-HY-MT1.5
Nodes2
On cloudLocal install
CategoryHY-MT
Stars1
Updated3 months ago
Readme
ComfyUI-HY-MT
ComfyUI node for Hunyuan Translation 1.5 and Hy-MT2. Forked and adapted from the upstream project: Tencent-Hunyuan/HY-MT.
<img width="875" height="846" alt="Image" src="https://github.com/user-attachments/assets/10c61cda-bcbe-4695-b04d-8fb59835da2b" />Install
- Place Hy-MT2 weights under
models/Hy-MT2-1.8B/. The node also keeps scanning the legacymodels/HY-MT1.5/<model_dir>folder for HY-MT1.5 models. - Ensure
transformersandtorchare available. Hy-MT2's official model card recommendstransformers>=5.6.0; older versions may fail if the model implementation requires newer APIs. - Put this folder in
custom_nodes/ComfyUI-HY-MT1.5(already done). - Restart ComfyUI.
Nodes
HY-MT Loader(Category:HY-MT): Select the localHy-MT2-1.8Bmodel or a legacyHY-MT1.5subfolder from the model dropdown.HY-MT Translator(Category:HY-MT): Translates with the optional model handle from the loader, or auto-loads the first available model.
How it works
- Scans
models/Hy-MT2-1.8B/first, thenmodels/HY-MT1.5/<model_dir>, and lazy-loads the tokenizer/model once (cached per path) withtorch_dtypeauto-chosen (bfloat16if CUDA is available). - Builds a prompt using the official templates (Chinese template when input/target involves Chinese or Cantonese; otherwise English).
- Generates and returns only the new tokens after the prompt for a clean translation string.
Notes
- Increase
max_new_tokensif you need longer outputs (default 512; hard cap 4096). Longer generations cost more VRAM/time; stay within your GPU/CPU limits.