Nodes/Prompt Palette-F/Gemma Translate
ComfyUI Node

Gemma Translate

Translate prompts with a real local LLM — no API, no key, no network

By id-fa·Created about a year ago·Updated 7 days ago· 2
Gemma Translate
  • clip
  • source
  • translated
text
target_languageEnglish
max_length512
unload_afterfalse

The pack's other translate node, PromptTabsTranslate, leans on Google Translate's free endpoint. Gemma Translate is the opposite philosophy: it runs an actual LLM on your own GPU and translates with zero network calls. The catch is the trade-off the README is upfront about - this is an experimental node, it needs a modern ComfyUI, and the translation only happens when you queue the workflow. If you want local translation, this is the one. If you want instant button-click translation, stick with the googletrans version.

The mechanism

This node uses the text-generation capability of Gemma4, which ComfyUI recently gained support for as a text encoder. You load a Gemma4 model with a standard CLIPLoader and wire it into the clip input - there's no separate model loader. The node then runs the exact same generation pipeline as ComfyUI's built-in TextGenerate node: clip.tokenizeclip.generateclip.decode, with a translation instruction in the prompt. That's why it requires ComfyUI v0.21.0 or later - older versions register the node but return an error string when you run it.

Two hard requirements to know before you start:

  1. You need a model file. The confirmed-working one is gemma4_e4b_it_fp8_scaled.safetensors, which lives in ComfyUI/models/text_encoders/ (download from Comfy-Org/gemma-4 on Hugging Face). fp8, so it's a reasonable VRAM footprint.
  2. It can't run standalone. The model only exists during workflow execution, so there's no button that translates on click like the googletrans node. You queue a (usually dedicated) workflow and the result appears in the node's translated field afterwards.

Newer option: on ComfyUI v0.26.0+ you can swap Gemma4 for Qwen3-VL, loaded the same way through a CLIPLoader, no code changes. Qwen3-VL is the community's default open VLM for local captioning, so if you already have it downloaded for captioning work, this is the cheaper path.

Inputs and outputs

  • clip - a Gemma4 (or Qwen3-VL) encoder from CLIPLoader. Required.
  • text - the source text to translate, multiline.
  • target_language - English / Japanese / Chinese.
  • max_length - generation cap in tokens (default 512).
  • unload_after - free the model from VRAM after translating (unload_all_models). Meant for dedicated translation workflows; it affects the whole session's model cache, so leave it off if you're reusing the model right after.

Outputs: source (your input, echoed back) and translated - the generated translation, with code fences, a Translation: label, and surrounding quotes stripped so you get a clean prompt. A swap button moves text between the fields if you want to go the other direction.

Installing it

Pack install first:

cd ComfyUI/custom_nodes
git clone https://github.com/id-fa/ComfyUI-PromptPalette-F prompt-palette-f
cd prompt-palette-f
pip install -r requirements.txt

Restart, and drop the model file into ComfyUI/models/text_encoders/. ComfyUI Manager users: search "Prompt Palette-F."

The honest verdict

This is a niche within a niche. If you only occasionally translate prompts, the googletrans tab node is faster and needs no model. But if you're doing serious multilingual prompting, want everything offline, or already run a Qwen3-VL for captioning, a local LLM translation that never phones home is genuinely nicer - no rate limits, no network dependency, and the output is already shaped for prompt use. Just remember it's labeled experimental for a reason: check that your ComfyUI is new enough before you blame the node for an error string.

CategoryPrompt Palette-F

Inputs (5)

NameTypeDefaultDescription
clipCLIP
textSTRING
target_languageCOMBOEnglish3 options: English, Japanese, Chinese
max_lengthINT5121–2048
unload_afterBOOLEANfalse

Outputs (2)

NameTypeDescription
sourceSTRING
translatedSTRING