Nodes/ComfyUI_Gayrat/Google Translate 2
ComfyUI Node

Google Translate 2

The zero-config 'auto to English' text node

By gayratv·Created about a year ago·Updated about a year ago· 3
Google Translate 2
    • translated_text
    text_to_translate

    If the other Google Translate nodes in this pack feel like too many dropdowns, here's the one that trims it to nothing: one text box in, translated English out, no language selection, no CLIP, no key. GoogleTranslateNode2 hard-codes the translation as auto-detect → English, which for most people is exactly the pipeline they want anyway - write your prompt in your native language, get English back, done.

    The "2" in the name is a tell: it's a second implementation of the same idea in this pack, alongside the AlekPet-forked family. Where the first family gives you full from/to language control, this one is a simpler, self-contained node with slightly different plumbing - it even pushes the result into the UI ("ui": {"text": [...]}), so the translated text shows up in the node's output display in some frontends, not just on the wire.

    How it works

    It's googletrans again - free, no API key, scraping Google's public translate endpoint. The node calls translator.translate(text, src="auto", dest="en") async, returns the string as translated_text, and prints errors to the console if Google refuses. The one input is text_to_translate (multiline), the one output is translated_text (STRING). Wire it into anything that eats text.

    The honest caveats

    Everything that's true of the free-translation family is true here, with a couple of extras. It's a scraper, so it can be rate-limited and flaky - the error path literally returns "Translation error: {e}" as the output string, so an error shows up as text rather than a crash. And auto-detect to English means you get no control: if the source text is already English, it still round-trips through Google (harmless, but it's a wasted network call and a chance for the text to get "improved" into something slightly different). And again - mechanical translator, so weighted prompt syntax and tag lists can come back mangled; keep it for prose.

    The one thing that makes this node interesting versus the others is simplicity: if you don't care about choosing target languages, this is the least-config node in the pack to drop into a workflow. The trade is that it only speaks English on the way out.

    Install

    ComfyUI Manager: search ComfyUI_Gayrat and install. By hand:

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

    Restart ComfyUI; find it under Gayrat/translate. No models, no key, no downloads beyond the pack's googletrans dependency. If you already run a bigger translate pack, this is a duplicate of what you have - skip it. If you don't, it's the fastest way to get native-language prompting working.

    CategoryGayrat/translate

    Inputs (1)

    NameTypeDefaultDescription
    text_to_translateSTRING

    Outputs (1)

    NameTypeDescription
    translated_textSTRING