Nodes/ComfyUI_AceNodes/πŸ… Text Google Translate
ComfyUI Node

πŸ… Text Google Translate

Free, keyless Google Translate inside a workflow β€” with a ticking clock attached

By hay86Β·Created 2 years agoΒ·Updated about a year agoΒ· 96
πŸ… Text Google Translate
    • STRING
    β—„textβ–Ί
    β—„from_langenβ–Ί
    β—„to_langenβ–Ί

    The name is a little bit of a lie. This node doesn't call the Google Translate API, it doesn't need an API key, and it doesn't cost you a cent - it scrapes Google's mobile translate page (translate.google.com/m) with a requests call and parses the result out of the HTML with BeautifulSoup. That's why it's free, and also why it's fragile. The endpoint isn't a supported public API, so Google can change the page markup at any time and this quietly stops working.

    Which makes it the perfect counterweight to the pack's other translator, ACE_TextTranslate: that one runs Helsinki-NLP's open-source opus-mt models locally (heavy download, zero network dependence after that), while this one is instant, offline-free, and about as accurate as consumer Google Translate gets - which for most prompt-translation use is "good enough, with weird phrases."

    How it works

    You feed it text and two language codes. It builds https://translate.google.com/m?sl=<from>&tl=<to>&q=<text>, fetches it, and grabs the translated string from the result-container div. Two things worth knowing before you build a workflow on top of it:

    • No auto-detect. from_lang is required, so you must tell it the source language. There's no "auto" option in the dropdown (28 languages, en default).
    • Silent failure. If the request fails or the HTML doesn't parse, it returns your original text unchanged. No error, no warning - just untranslated text flowing downstream. That's the trap.

    If from_lang equals to_lang, it skips straight through. Output is a single STRING, ready to feed a CLIP text encoder or a prompt-editing node.

    What you actually set

    • text - multiline; each line is translated as one block, and the output keeps your line structure.
    • from_lang / to_lang - pick from the dropdown. Again: en is the default for both, so if you forget to change to_lang you'll "translate" English to English and wonder why nothing happened.

    Installing

    ComfyUI Manager β†’ search ComfyUI_AceNodes, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/hay86/ComfyUI_AceNodes
    

    Then restart. The node itself only needs requests and beautifulsoup4, both in the pack's requirements.txt - but Manager installs the whole list, so you'll drag in transformers, insightface, rembg and the rest even if you never touch them.

    The honest verdict

    For one-off prompt translation it's fine, but it's an ad-hoc scraped endpoint living in a pack whose own author doesn't maintain it much (the repo is a single-commit effort from mid-2025). If your pipeline depends on translation - say, translating generated prompts in a batch that runs unattended - the local ACE_TextTranslate is the safer long-term bet, and any other translator pack that wraps a real Google API key is the reliable one. Use this one when you want free, instant, and don't mind checking that the output actually translated.

    CategoryAce Nodes

    Inputs (3)

    NameTypeDefaultDescription
    textSTRINGβ€”
    from_langCOMBOen28 options: en, zh, es, hi, ar, pt, +22
    to_langCOMBOen28 options: en, zh, es, hi, ar, pt, +22

    Outputs (1)

    NameTypeDescription
    STRINGSTRINGβ€”