Nodes/Doom_Flux_NodePack/Doom Translate
ComfyUI Node

Doom Translate

Translate your prompts locally with Tencent's HY-MT models

By PeterMikhai·Created about a year ago·Updated 6 days ago· 1
Doom Translate
    • translated_text
    text
    model_nameHY-MT1.5-1.8B-FP8
    target_languageEnglish
    dtype_modebfloat16
    device_map_modeauto
    trust_remote_codefalse
    keep_model_loadedfalse
    seed0
    max_new_tokens2048

    This is the node that quietly breaks the pack's "no extra dependencies" promise, and it's worth it: Doom Translate runs a real machine-translation model locally - Tencent's HY-MT 1.5 family - so you can write prompts in your own language and translate them to English (or any of ~36 target languages) without sending your text to a cloud API. No key, no account, no rate limits. The name is honest: it translates, on your hardware, and the model downloads from HuggingFace on first use.

    It's aimed squarely at the pack's Russian-speaking audience, but the use case is universal: if English isn't your first language, or you keep a prompt notebook in your native tongue, this is the node that converts your ideas into text the model was trained on. Most modern encoders - Flux, Krea 2, H3 - were trained with English-dominant captions, so writing in your language then translating is genuinely better than feeding the model your native prose directly.

    How it works

    The node loads a transformers model from the Tencent HuggingFace repos (tencent/HY-MT1.5-1.8B-FP8 is the default), tokenizes your text, generates up to max_new_tokens, and returns the translation. There are four model choices - the 1.8B and 7B sizes, each in plain and FP8 versions. FP8 is the sensible default: a fraction of the VRAM for essentially the same output on translation.

    The inputs that matter

    • text - what you want translated. Multiline.
    • target_language - from English to Vietnamese, ~36 languages in the list. The model picks the output language from this.
    • model_name - HY-MT1.5-1.8B-FP8 (default), 1.8B, 7B-FP8, or 7B. Bigger is more fluent but eats VRAM.
    • dtype_mode - auto / bfloat16 / float16 / float32. bfloat16 default.
    • device_map_mode - auto / cpu / cuda:0. auto spreads across what you have.
    • keep_model_loaded - keep the model cached in VRAM between runs. Off by default, and off is usually right: it's a translation model, not your sampler, and a few seconds of reload beats a permanently pinned chunk of VRAM.
    • trust_remote_code - the tooltip says it plainly: "Allow execution of custom code from the model repository." Leave it off unless you have a specific reason.
    • max_new_tokens - cap on generated tokens. 2048 default.
    • seed - for reproducible sampling.

    Output is a single translated_text string, ready to feed a sampler or a prompt builder.

    Setup - read this, it's the one that differs

    The pack install is the usual:

    cd ComfyUI/custom_nodes
    git clone https://github.com/PeterMikhai/Doom_Flux_NodePack
    

    But this node needs transformers and huggingface_hub, which ComfyUI does not ship by default. The imports are lazy - the pack loads fine without them - but the first time you run Doom Translate it will fail with an ImportError unless you install them:

    pip install transformers accelerate huggingface_hub
    

    Then restart ComfyUI. This is the one place the README's "everything runs on ComfyUI's own stack" claim falls over.

    Where people get burned

    • The first run downloads a model. The 1.8B FP8 is a ~1–2 GB download from HuggingFace; the 7B is several GB. First run will look frozen while it fetches. It's downloading, not hung.
    • VRAM. Even FP8, a 7B model is a real chunk of memory sitting next to a 12B diffusion model. Prefer the 1.8B unless you need the fluency, and keep keep_model_loaded off.
    • trust_remote_code should stay false. It exists for repos that need custom code to run. A translation model from a major vendor doesn't. Enabling it on an unknown repo is how you get malware - this node's own tooltip is the warning.
    • Translation quality follows model size. 1.8B is fine for prompt-length text; long prose and tricky idioms favor the 7B. For prompt work, the small model is genuinely enough.

    It's the odd node in a pack that's otherwise all sampling and saving - but if you're building prompts in a non-English language, it's the one that makes the rest of the pack actually work for you.

    CategoryDoom/Prompt

    Inputs (9)

    NameTypeDefaultDescription
    textSTRING
    model_nameCOMBOHY-MT1.5-1.8B-FP84 options: HY-MT1.5-1.8B-FP8, HY-MT1.5-1.8B, HY-MT1.5-7B-FP8, HY-MT1.5-7B
    target_languageCOMBOEnglish36 options: English, Arabic, Bengali, Burmese, Chinese, Czech, +30
    dtype_modeCOMBObfloat164 options: auto, bfloat16, float16, float32
    device_map_modeCOMBOauto3 options: auto, cpu, cuda:0
    trust_remote_codeBOOLEANfalseAllow execution of custom code from the model repository.
    keep_model_loadedBOOLEANfalseKeep the selected model cached after inference.
    seedINT00–65535
    max_new_tokensINT204864–4096Maximum new tokens to generate.

    Outputs (1)

    NameTypeDescription
    translated_textSTRING