Google Translate
Google Translate in your prompt line, no API key required
- text
The name is not a lie: it calls Google Translate, and you don't need an API key. Google Translate (QG_GoogleTranslateText, QG-tools/文本) takes a string, translates it into a target language while the queue runs, and hands the result to whatever text input you point it at.
Why you'd want this at all, if you write prompts in English: because a lot of people don't. And because prompt phrasing is language-specific in ways that matter - a model's training captions were mostly English, so writing your idea in your first language and machine-translating it is often easier than fighting for the right English idiom. The other use is the reverse direction: you're generating a sign, a poster, a comic panel that has to contain actual Chinese or Japanese text, and you'd rather write the caption in your own language and let a translator produce the string.
How it works
Two knobs and a text box. from_translate is the source language with auto as the default, letting Google detect it. to_translate is the target, defaulting to en. Both are big enum lists - roughly a hundred languages each - so they're searchable in the widget.
When the prompt executes, the node sends your text to Google and returns the translation as a single STRING. If you set the environment variable GOOGLE_TRANSLATION_API_KEY, it switches to the official Google Cloud Translation API instead of the free endpoint, and that path is unmetered by Google's informal rate limiting. No key set, and it uses the free translate endpoint over plain requests, which ComfyUI already ships, so there's genuinely no extra dependency.
The manual_translate boolean is the part that confuses people, so read the tooltip twice: switch it on and the node passes the text through untranslated, and instead you use the "manual translate" button on the node to translate the text in the box in place, on demand. It's a workbench mode - you iterate on wording by hand, then turn the switch off for the wired-up automatic path.
Failure handling is deliberately quiet. The free endpoint is rate-limited on some IP ranges and will throw HTTP 429s; on a rate limit, a timeout, or any network exception, the node returns the original text rather than raising. Your graph finishes, just in the wrong language. That's the right call for unattended runs and mildly annoying when you're debugging, because you have to notice.
Inputs and outputs
from_translate(required, enum, defaultauto) - source language, or let Google guess.to_translate(required, enum, defaulten) - where you want to land.manual_translate(required, boolean) - on means "do not auto-translate, I'll press the button".text(required, multiline STRING) - what gets translated.- Output:
text(STRING) - the translated text.
Wire the output into CLIP Text Encode, a prompt-box input (anything you converted to a string socket), or a preview node if you just want to read it. Because it's a plain STRING, it composes with the rest of this pack's text nodes - split it, find/replace it, whatever.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/live1617/ComfyUI-QG-tools
Full restart afterwards; look for [QG-tools] v0.9.2 加载完成 | 节点数 24 in the console. Manager search for ComfyUI-QG-Tools also works where the Registry listing is live. Nothing to pip install - the pack's requirements file is intentionally all comments so Manager doesn't run a pip step, and this node leans on requests, which ComfyUI already has.
This one was ported from AlekPet's node collection (MIT); the pack keeps the original licensing in its licenses/ folder.
Where people get burned
Silent failure. The most common report shape for any free-translation node is "it worked yesterday". That's the 429 fallback doing its job - you're getting your source text back, not a translation. Set GOOGLE_TRANSLATION_API_KEY before launching ComfyUI if you're translating on every run, or accept that a busy shared IP will occasionally hand you the original.
Translating at the wrong moment. The node translates when the queue runs, not when you type. Update text and nothing happens until you queue. In manual mode it's the opposite and nothing happens until you click. Pick one mode and stay in it.
Using it on structured prompts. If your prompt is full of weights or syntax a machine translator doesn't understand, it will happily mangle it. Translate the prose, then add syntax after - a node that rewrites your tokens is doing exactly what you asked, just not what you meant.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| from_translate | COMBO | auto | Source language. "auto" lets Google detect it. |
| to_translate | COMBO | en | Target language for the translation. |
| manual_translate | BOOLEAN | false | When on, the node passes the text through and you translate in place with the Manual Translate button. |
| text | STRING | The text to translate. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| text | STRING | The translated text. |