Nodes/ComfyUI-GoogleTranslate-Chunked/Google Translate Chunked (CLIP)
ComfyUI Node

Google Translate Chunked (CLIP)

From Your Language Straight to Conditioning

By SergPoletaev·Created 6 months ago·Updated 6 months ago· 0
Google Translate Chunked (CLIP)
  • clip
  • conditioning
  • translated_text
text
from_translateauto
to_translateen
manual_translatefalse
chunk_size4999

If you've ever built the classic non-English workflow - translate your prompt to English, then hand the result to a CLIP Text Encode - this node deletes a step and a wire. It's the same translator as its sibling Google Translate Chunked, but it doesn't stop at text: it takes the CLIP model itself and hands you ready-to-plug-in conditioning. Type in your language, queue, done. No key, no account, no middleman.

Think of it as a drop-in replacement for CLIP Text Encode for the case where your prompt isn't in English. Same socket going out to the KSampler, one less translation node sitting in the graph.

How it works

Under the hood it's two well-understood halves. First the translation, chunked the same way as the plain node: any text over the chunk limit gets split at sentence boundaries, translated piece by piece through the free googletrans endpoint, and rejoined. Then the CLIP half runs the standard encode path - clip.tokenize() followed by clip.encode_from_tokens(..., return_pooled=True) - and returns [[cond, {"pooled_output": pooled}]], which is exactly the conditioning format core CLIPTextEncode produces. So the output behaves identically to what you already wire into your sampler's positive and negative.

The inputs that matter

  • clip - the required CLIP input, straight from your checkpoint loader (or dual-CLIP loader for SDXL/Flux). This is what makes the node different from the plain translator.
  • text - your prompt, in whatever language it's in.
  • from_translate / to_translate - source (default auto) and target (default en), with the full googletrans language list behind the dropdowns.
  • manual_translate - true skips translation and encodes the text as-is. This one pays for itself here: translate once, tweak the English by hand, then re-encode offline without hitting Google again (or when the free endpoint is having a bad day).
  • chunk_size - default 4999, the free API's happy zone.

Outputs: conditioning (CONDITIONING) into your KSampler, plus translated_text (STRING) on a second socket so you can see or save what was actually encoded.

The honest caveat

Translation fixes the language, not the encoder's appetite. The whole translated prompt still goes through CLIP's normal tokenizer, and classic CLIP still truncates around 77 tokens - chunking the text for translation doesn't make a 10,000-character prompt fit. LLM-based encoders (Flux's T5, the newer 2026 models) handle far more, but the short-encoder truncation is the model's doing, not the node's. If a translated prompt feels like it's losing detail, suspect the token limit, not the translation.

Installing it

ComfyUI Manager, search "GoogleTranslate Chunked", or:

cd ComfyUI/custom_nodes
git clone https://github.com/SergPoletaev/ComfyUI-GoogleTranslate-Chunked

Restart, then install the one dependency - and note the repo ships no requirements.txt, so you do this yourself:

pip install googletrans==4.0.0-rc1

No models to download; it runs on CPU network calls. Set the GOOGLE_TRANSLATION_API_KEY env var if you'd rather pay for Google's official Cloud Translation than trust the free endpoint.

Where people get burned

Same failure mode as the whole pack: the unofficial API is free because it's unofficial. It can rate-limit on long multi-chunk runs and go stale when Google rotates its tokens, and when a chunk fails the node keeps the original text in its place - so check the console and expect a mixed-language output now and then. The pragmatic move is to keep chunk_size near the default, watch the log, and treat manual_translate as your escape hatch when the endpoint misbehaves.

Categoryconditioning/translate

Inputs (6)

NameTypeDefaultDescription
textSTRING
from_translateCOMBOauto3 options: auto, en, ru
to_translateCOMBOen2 options: en, ru
clipCLIP
manual_translateoptBOOLEANfalse
chunk_sizeoptINT4999100–10000

Outputs (2)

NameTypeDescription
conditioningCONDITIONING
translated_textSTRING