Nodes/ComfyUI_LLM_Banana/🌐 Gemini Banana AI Text Translation
ComfyUI Node

🌐 Gemini Banana AI Text Translation

A translation node that works even with no API key

By xuchenxu168·Created 12 months ago·Updated 9 months ago· 46
🌐 Gemini Banana AI Text Translation
    • translated_text
    • detected_language
    • translation_info
    api_key
    textHello, how are you today?
    translation_enginegoogle-translate
    source_languageauto
    target_languagezh-CN
    quality_modehigh
    preserve_formattingtrue
    context_awaretrue
    temperature0.30
    max_output_tokens4096
    context_info
    custom_instructions

    The display name says "Gemini Banana AI Text Translation," but the default engine doesn't touch Gemini at all - it's google-translate, and it doesn't need your key. That's the first thing to know about this node: it's a multi-engine translation box with a free tier that actually works out of the box, which is rarer than it should be in the API-node world.

    Where does a translation node fit in a ComfyUI workflow? Same place every LLM-ish node fits - as plumbing upstream of generation. You're working in Chinese, your Flux prompt wants English, or you pulled a prompt from a Japanese source and need it rephrased before it hits the text encoder. Wire text in, get translated text out, done. For a pack that's mostly image generation, this is the quiet utility that keeps a pipeline running.

    How it works

    The translation_engine dropdown is the whole node, really. It lists google-translate (default, free), youdao-translate, libre-translate, mymemory-translate, baidu-api, deepl-free, gemini-ai, openai-gpt, and auto-best. The free ones scrape or hit public endpoints - google-translate calls the translate_a/single endpoint directly, so no credentials. The LLM engines (gemini-ai, openai-gpt) need keys from Translation_config.json or the node's api_key field, and give you the context-aware, tone-controlled result that free engines can't. auto-best tries the best available engine and falls back. There's also automatic proxy detection - it checks env vars and common local proxy ports (Clash, Shadowsocks, V2Ray) so it works in regions where the free endpoints need a hop.

    The inputs that matter

    • text - what you're translating.
    • source_language / target_language - 25 options each, auto detection included. Default is auto → zh-CN.
    • translation_engine - the free defaults need no key; switch to gemini-ai only if you want quality and have a key.
    • quality_mode - standard / high / creative / formal / casual. Only the LLM engines really honor this; the free engines translate flat.
    • preserve_formatting and context_aware - keep line breaks, and add context (via context_info) for better technical translation.
    • context_info / custom_instructions (optional) - feed it domain context or override the translation style.

    Outputs are translated_text, plus detected_language and translation_info if you want to know what the engine decided.

    Install

    ComfyUI Manager → search ComfyUI_LLM_Banana, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/xuchenxu168/ComfyUI_LLM_Banana
    cd ComfyUI_LLM_Banana
    pip install -r requirements.txt
    

    restart, then find it under the Ken-Chen category.

    Gotchas

    The free endpoints are exactly as reliable as free endpoints usually are - rate limits and occasional timeouts, especially mymemory and the scraped DeepL methods. If you're building a workflow that must translate every run, budget for a real key and set the engine to gemini-ai or openai-gpt. And if the node keeps failing and you're behind a proxy, check that the automatic proxy detection picked up your port - that's the silent killer for this node outside mainland networks.

    CategoryKen-Chen/LLM-Nano-Banana

    Inputs (12)

    NameTypeDefaultDescription
    api_keySTRING
    textSTRINGHello, how are you today?
    translation_engineCOMBOgoogle-translate9 options: google-translate, youdao-translate, libre-translate, mymemory-translate, baidu-api, deepl-free, +3
    source_languageCOMBOauto25 options: auto, zh-CN, zh-TW, en, ja, ko, +19
    target_languageCOMBOzh-CN25 options: auto, zh-CN, zh-TW, en, ja, ko, +19
    quality_modeCOMBOhigh5 options: standard, high, creative, formal, casual
    preserve_formattingBOOLEANtrue
    context_awareBOOLEANtrue
    temperatureFLOAT0.300–1
    max_output_tokensINT4096100–8192
    context_infooptSTRING
    custom_instructionsoptSTRING

    Outputs (3)

    NameTypeDescription
    translated_textSTRING
    detected_languageSTRING
    translation_infoSTRING