Nodes/ComfyUI_Gayrat/Google Translate (Text Only)
ComfyUI Node

Google Translate (Text Only)

The no-clip version of the prompt translator

By gayratv·Created about a year ago·Updated about a year ago· 3
Google Translate (Text Only)
    • text
    from_translateauto
    to_translateen
    text

    This is the stripped-down sibling of GoogleTranslateCLIPTextEncode from the same pack: it translates text and returns it as a STRING, no CLIP encode, no conditioning. If you want to translate a prompt but then do something with the text other than feeding it straight into a text encoder - paste it into a composed prompt, merge it with tags, translate a caption for a LoRA dataset, run it through a second node - this is the one.

    Like the whole translate family here, it's free, needs no key, and leans on the googletrans library scraping Google's free endpoint. The node is literally a subclass of the CLIP-encode version with the clip input removed and only the translated string returned.

    Inputs and output

    • from_translate - source language, default auto (auto-detect among ~245 codes).
    • to_translate - target language, default en.
    • text - the text to translate, multiline.

    Output: text, the translated STRING.

    That's the whole surface. Wire it into a text-concat node, a CLIP Text Encode, a filename, or a display node - anything that eats a string.

    The honest caveats

    Same as the CLIP version, because it's the same engine: it's a scraper, so it's rate-limited and occasionally flaky, and it needs network on every run. If translations come back empty, that's googletrans hitting Google's limits, not a broken node. And because it's a mechanical translator, weighted prompt syntax ((word:1.4)) and Danbooru-style tags can get mangled - keep that in mind when you feed it prompt text rather than prose. It's also async under the hood (it reuses the same run_async helper), so it won't block your graph while Google responds.

    If you already have AlekPet's ComfyUI_Custom_Nodes_AlekPet installed, you likely have this node under a similar name - this is a fork of that code. And if you never need the string and just want conditioning, reach for the CLIP Text Encode variant instead, which does the encode for you.

    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; it's under Gayrat/translate. No models to download, nothing heavy - just googletrans and friends from the pack's requirements.

    CategoryGayrat/translate

    Inputs (3)

    NameTypeDefaultDescription
    from_translateCOMBOauto246 options: auto, abk, ace, ach, aar, af, +240
    to_translateCOMBOen245 options: abk, ace, ach, aar, af, sq, +239
    textSTRING

    Outputs (1)

    NameTypeDescription
    textSTRING