Prompt Translation HY
38-language prompt translation with Tencent's Hunyuan-MT
- text
The pack's other translation node, Prompt Translation, is a lightweight Chinese/English pair. Prompt Translation HY is the heavyweight: it runs Tencent's Hunyuan-MT model and can translate your prompt into any of 38 languages - English, French, Japanese, Arabic, Bengali, even Tibetan and Uyghur. If your prompt chain needs to produce localized variants, or you write in a language the small opus-mt models don't cover, this is the node for it. It is also, without question, the most demanding node in ComfyUI-PromptWrapper to actually get running, because the model is the size of a small diffusion model.
How it works
The node loads a Hugging Face causal LM from ComfyUI/models/nlp/<model_name> and runs it through a chat template ("Translate the following segment into <language>, without additional explanation"), then extracts the reply. Two model choices:
- tencent/HY-MT1.5-1.8B - the 1.8B model. The practical default; fits in a few GB of RAM/VRAM.
- tencent/Hunyuan-MT-7B - the 7B model. Better quality, substantially heavier; this is the one that needs real hardware.
The target_language dropdown lists all 38 languages by their Chinese name (中文, 英语, 法语…), so if your ComfyUI is set to English that dropdown is still in Chinese - a quirk worth knowing before you click.
Install and the model download
The node installs with the pack via ComfyUI Manager (search ComfyUI-PromptWrapper) or:
cd ComfyUI/custom_nodes
git clone https://github.com/clouddreamfly/ComfyUI-PromptWrapper
But like its sibling, the model must be downloaded by hand - the node raises "Local model not found at ... Please download the model and place it in the ComfyUI/models/nlp folder." if it's absent. The README points at the hf-mirror.com copy:
mkdir -p models/nlp/tencent/HY-MT1.5-1.8B
# download ALL files from https://huggingface.co/tencent/HY-MT1.5-1.8B/tree/main into that folder
It needs transformers (and torch for device placement), which ComfyUI's standard environment already ships - the pack's own requirements file is empty.
Where people get burned
Disk and RAM are the first wall: the 7B is a multi-gigabyte download and a real VRAM commitment on top of whatever checkpoint you're generating with. Start with the 1.8B unless you have a reason not to. The Chinese-language dropdown is the second trap - the 38 target languages are shown as 中文/英语/法语 etc., not English names, so translate before you click. And one more: this is a full LLM doing a translation, so a short tag prompt can come back padded with chat-style filler if the model gets chatty - the node tries to strip the reply markers, but give it clean input. Local, private, and genuinely multilingual - just budget for the download.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| model_name | COMBO | 2 options: tencent/HY-MT1.5-1.8B, tencent/Hunyuan-MT-7B | |
| target_language | COMBO | 38 options: 中文, 英语, 法语, 葡萄牙语, 西班牙语, 日语, +32 | |
| prompt | STRING | A beautiful photo of | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |