Traductor: Prompt Texto (Multi-Idioma)
STRING In, English Out
- prompt
The same offline translation engine as the pack's CLIP node, minus the CLIP. You give this one a text prompt, it translates it locally, and it hands you back a STRING you can wire into anything - a regular CLIP Text Encode, a text file, a preview node, even a Flux workflow where the fancier CLIP-node sibling doesn't fit. If you just need to translate prompts and don't want to commit to one encoder path, this is the node you reach for.
It shares all the mechanics with its sibling, so the story is mostly the same: ONNX Marian models (opus-mt-*, from Xenova and Helsinki-NLP) loaded through optimum[onnxruntime], lazy loading on first use per language pair, a SQLite cache so repeated prompts don't re-run inference, NLTK sentence splitting into ~400-token chunks, and an English pivot when no direct model exists between your languages. If the translation fails, it quietly returns your original prompt - the pipeline keeps running, but you get whatever you typed.
The inputs and output
Four inputs, one output - it's a deliberately thin node.
prompt- your text, multiline. Unlike the CLIP variant, this one doesn't setdynamicPrompts, so don't expect prompt-scheduling syntax to run here; it treats the string as literal text.src_lang/tgt_lang- the same fixed menu as the rest of the pack:es,en,fr,de, defaulting toes→en. The README is in Spanish and the author's target user clearly prompts in Spanish and wants English output.
The output is a plain prompt STRING. That's it. To actually see what it produced, run it into a Preview Text or anything that displays strings - there's no baked-in preview. The console logs it though: [Prompt Translator] es→en: '...'.
Why you'd use this instead of the CLIP version
The CLIP-text node translates and encodes, which is convenient but locks you to one path. This one just translates, so it composes with whatever else you're doing. Two genuinely common setups:
- Flux / dual-encoder workflows. Flux wants a prompt in its T5 path, and if you think in Spanish, running your text through this node before
ClipTextEncodeFluxgets you an English prompt without restructuring anything. - Checking your work. Translate first, eyeball the English string, then decide whether the model's going to understand it. Hand-translating prompts or copy-pasting through a web service is exactly the workflow this pack exists to kill - no account, no API key, no DeepL signup friction.
Installing it
Same pack, same steps - this is one of two nodes shipped in ComfyUI-translate-offline. Easiest via ComfyUI Manager (search "ComfyUI-translate-offline"), or:
cd ComfyUI/custom_nodes
git clone https://github.com/Jairodaniel-17/ComfyUI-translate-offline
pip install torch optimum[onnxruntime] transformers nltk
Restart ComfyUI and look for Traductor: Prompt Texto (Multi-Idioma) under conditioning. First translation per language pair downloads its model from Hugging Face - have internet for that one run - then everything is local and cached.
The honest caveats
It's the same small-language-menu limitation as the rest of the pack: es/en/fr/de, full stop. That's fine for a huge chunk of Western Europe's hobbyist crowd, but it means no Chinese, no Japanese, no Russian - and the popular "translate your prompt into Chinese for a Chinese-friendly model" trick is off the table unless you edit infrastructure/di_container.py and add model pairs yourself. It's also a young, low-traffic pack with essentially no community track record yet, so treat the silent-fallback behavior as a feature to verify rather than trust blindly: if you're not watching the logs, a failed translation just looks like a mediocre English prompt. On the plus side, the lazy loading and SQLite cache mean the second time you use it, it's fast enough that you stop noticing it's there.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | — | |
| src_lang | COMBO | es | 4 options: es, en, fr, de |
| tgt_lang | COMBO | en | 4 options: en, es, fr, de |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| prompt | STRING | — |