Prompt Translator (GGUF)
Translate Your Prompts Into English or Chinese — Locally, No API Key
- translated
- origin
"Prompt Translator (GGUF)" does one unglamorous thing: take whatever you typed and rewrite it in English (or Simplified Chinese) using a local LLM that runs entirely on your machine. No API key, no internet, no per-call bill. The name is honest about the mechanics - it's llama-cpp-python driving a GGUF chat model - and that's the whole appeal. If you think in your native language but prompt in English, or you're handed a Chinese reference prompt and want a working English one, this is the node for that.
The "prompt translator" idea is old in the Stable Diffusion world - the A1111 era had extensions for it, mostly bolted onto online translation services. This one is fully local, which buys you two things that matter: it works offline, and it won't strip your prompt through some filter. The node's system prompt is explicit about it: keep style tags, weights, parentheses, and comma-separated structure; do not remove NSFW tags if present; output only the translation. A local, uncensored model is exactly the shape of tool people reach for here.
How it works
The pack registers a model folder under ComfyUI/models/gguf/, creates it if it's missing, and scans it for .gguf files. Your model dropdown is that list - nothing else. On translate, the node fires a chat completion at the loaded model (temperature 0.7, top_p 0.9, up to 4096 tokens) with a translation-focused system prompt, then hands you the result. It's a plain language-model rewrite, scoped to translation rather than the detail-adding enhancer. Recent versions of the pack have split model loading into a separate GGUFLoader node; if your install shows that instead of the integrated dropdown, it's the same settings, just on a loader you wire in first.
The inputs that actually matter
- prompt - the text to translate.
- model - dropdown of
.gguffiles inmodels/gguf/. If it shows onlynone, the folder is empty; drop a model in and restart. - target_language - English or Chinese (Simplified).
- device - defaults to cpu, which is the smart default: translation eats system RAM, not your VRAM.
- n_gpu_layers - offload layers to the GPU, but only takes effect when
device=cuda;-1means all layers,0means CPU (that's the author's own tooltip).
Outputs are translated and origin (the original prompt, passed through untouched). Wire translated into your positive prompt, or into the pack's ShowTextNode to eyeball the result before it hits the sampler.
What model to run
The README points at Qwen2.5-7B-Instruct as Q4_K_M (~4.7GB) from the official Qwen GGUF repo, or the QuantFactory "Uncensored" build of the same model. For translating a prompt, that's plenty - you don't need a bigger model for a short rewrite, and an LLM here is a translation worker, not a writer. One trap to avoid: these are chat LLMs. Don't confuse them with the GGUF diffusion checkpoints you load through city96's ComfyUI-GGUF - same file extension, completely different job.
Installing it
ComfyUI Manager can grab it (search "ComfyUI-PromptTranslator"), or the manual way:
cd ComfyUI/custom_nodes
git clone https://github.com/er1cw00/ComfyUI-PromptTranslator.git
cd ComfyUI-PromptTranslator
pip install -r requirements.txt
Then restart ComfyUI. Two real gotchas here. First, llama-cpp-python has no official wheels for the Python that ComfyUI bundles, so on Windows pip will try to compile it from source and can hang or die. The usual fix is a prebuilt wheel from a community release repo (search "llama-cpp-python prebuilt wheels") matched to your Python and CUDA versions, installed into ComfyUI's own Python - python_embed/python.exe on portable installs. Second, the node does not download a model for you; that ~4.7GB download is on you, and it goes in models/gguf/.
Common issues
- Model dropdown shows only "none".
models/gguf/is empty or wasn't scanned; drop a.ggufin and restart ComfyUI. - Node won't load / import error on llama_cpp. The dependency didn't actually install - see the prebuilt-wheel fix above.
- Translation is slow. Default device is cpu, so that's expected on a 7B model. Set
device=cudawithn_gpu_layers=-1to offload - just remember you're now competing with your diffusion checkpoint for VRAM. The pack's stated design is to free the model after translating, so treat it as a one-shot step at the top of the workflow. - Prompt comes back unchanged and nothing looks wrong. On any exception the node quietly falls back to returning the original prompt - the tell is
[PromptTranslator] Translation errorin the console. If nothing changed, check the log first.
Verdict
This is a small, quiet pack - few installs, no buzz - and it's MIT-licensed and short enough to read in one sitting before you trust it with a download. It's not a prompt enhancer that invents detail; it translates and preserves what you wrote. For non-native speakers tired of fighting prompts into English, it's a genuinely handy graph-level tool.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | — | |
| model | COMBO | none | 1 options: none |
| device | COMBO | cpu | 3 options: cpu, cuda, mps |
| n_gpu_layers | INT | -1-1–100 | Number of GPU layers (-1 for all, 0 for CPU). Only used when device=cuda |
| target_language | COMBO | English | 2 options: English, Chinese (Simplified) |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| translated | STRING | — |
| origin | STRING | — |