Nodes/ComfyUI builmenlabo - Unified Package/🌐 BuimenLabo Prompt Translator
ComfyUI Node

🌐 BuimenLabo Prompt Translator

Translate prompts in-graph with no API key β€” if you pick Google

By comnote-maxΒ·Created about a year agoΒ·Updated about a year agoΒ· 5
🌐 BuimenLabo Prompt Translator
    • original_text
    • translated_text
    • token_count
    β—„providerGoogleβ–Ί
    β—„input_textβ–Ί
    β—„translation_modeOther Language β†’ Englishβ–Ί
    β—„other_languageJapaneseβ–Ί
    β—„api_keyβ–Ί
    β—„execute_translationfalseβ–Ί
    β—„translated_textβ–Ί
    β—„input_text_connectionβ€”β–Ί

    The BuimenLabo Prompt Translator does one genuinely useful thing: it translates your prompt to or from English right inside the graph, and hands you the result as a text output you can wire straight into a CLIP encoder. No copy-paste into Google Translate, no second browser tab. And the headline feature - the one the name undersells - is that the Google provider works with no API key at all.

    It's one of seven nodes in the builmenlabo pack, a small unified bundle by a note.com author (BuimenLabo) who wrote it as a companion to a ComfyUI custom-node tutorial series. It's MIT, it's free, and it's clearly a personal project rather than a marquee pack - there's essentially zero community chatter about it. That's fine. For a "translate my Japanese prompt to English before it hits the model" job, it gets the thing done.

    How it works

    Under the hood it's five provider backends behind one interface, called over plain requests:

    • Google - with no key it hits the unofficial translate.googleapis.com/translate_a/single?client=gtx endpoint. Free, but it's the same scraper-adjacent endpoint that other tools use, so it can get rate-limited or flaky. Works most of the time; don't build a 24/7 pipeline on it.
    • DeepL - needs a key (it even detects the :fx free-tier format and routes to the free endpoint).
    • Yandex - needs a key.
    • Baidu - needs an app_id:secret pair, pasted in that exact format.
    • MarianMT - a local translator via Helsinki-NLP's opus-mt models. No internet, no key - but it only does Japanese↔English, whatever you set elsewhere.

    Results get cached (with a throttle so rapid re-runs don't hammer the API), and API keys you enter are saved to ~/.comfyui/prompt_translator_cache.json so you don't retype them. Token counting uses the CLIP tokenizer when transformers is installed and a rough word-count fallback when it isn't - useful, not gospel.

    Inputs and outputs that matter

    Only a handful matter for a beginner:

    • provider - start with Google (no key). Swap to DeepL if quality or consistency disappoints.
    • input_text - the prompt to translate. Or leave it and use the optional input_text_connection to wire text in from another node.
    • translation_mode - English β†’ Other Language or Other Language β†’ English. Default is the direction you want 90% of the time.
    • other_language - the 20-language dropdown (Japanese, Chinese, Korean, …).
    • api_key - only for DeepL/Yandex/Baidu.
    • execute_translation - this is the gotcha. It's a toggle, and nothing happens until you flip it on (there's also a front-end button that does the same job).

    Outputs are original_text, translated_text, and token_count (INT). Wire translated_text into a CLIP Text Encode positive input and you're done. Keep original_text if you want to compare.

    Installing it

    Same story as the rest of the pack: ComfyUI Manager β†’ search "BuimenLabo" β†’ Install β†’ restart. Or manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/comnote-max/builmenlabo
    

    Dependencies are light - requests, numpy, Pillow, psutil are the essentials, and the Manager install handles them. No model downloads needed for the online providers. If you want CLIP token counting or the offline MarianMT path, that's where transformers comes in, and it's optional.

    Where people get burned

    • The free Google path is unofficial. If it starts throwing "Free Google translation failed", that's the endpoint being cranky, not you. Retry, or spend a DeepL key.
    • Baidu's format trips people up - it's app_id:secret, not a single key. The node validates this and will refuse politely.
    • Forgetting the execute toggle. The node looks inert until you flip it. That's by design - it's UI-driven - but it confuses everyone the first time.
    • The README's clone URL is a placeholder (YOUR_USERNAME); the real repo is comnote-max/builmenlabo.

    One more context note: this node translates text, but translation alone won't fix a prompt that's fighting its encoder. The translator is best used with tag-based models (SD 1.5/SDXL lineage), where converting your idea to clean English tags before conditioning does real work.

    Categorytext/translation

    Inputs (8)

    NameTypeDefaultDescription
    providerCOMBOGoogle5 options: Google, DeepL, Yandex, Baidu, MarianMT
    input_textSTRINGβ€”
    translation_modeCOMBOOther Language β†’ English2 options: English β†’ Other Language, Other Language β†’ English
    other_languageCOMBOJapanese20 options: Japanese, Chinese, Korean, Spanish, French, German, +14
    api_keySTRINGβ€”
    execute_translationBOOLEANfalseβ€”
    translated_textSTRINGβ€”
    input_text_connectionoptSTRINGβ€”

    Outputs (3)

    NameTypeDescription
    original_textSTRINGβ€”
    translated_textSTRINGβ€”
    token_countINTβ€”