Nodes/Prompt Translator & Enhancer/Prompt Translator & Enhancer (Multi→EN)
ComfyUI Node

Prompt Translator & Enhancer (Multi→EN)

No API, no key, no loader node

By ezetojo·Created 7 months ago·Updated 6 months ago· 0
Prompt Translator & Enhancer (Multi→EN)
    • enhanced_prompt
    • original_prompt
    prompt
    llm_modelno_models_found
    enhancement_leveldetailed
    n_gpu_layers-1
    max_tokens256
    temperature0.70
    seed-1

    Prompt Translator & Enhancer (Multi→EN) is the pack's everything-in-one. Pick a GGUF model from the dropdown, type a prompt in whatever language, and out the other end comes a comma-separated English tag list ready for CLIP Text Encode. No separate loader, no wires, no API key, no cloud - just a 2–4 GB model running locally through llama.cpp. If you want to see what this pack does in under a minute, this is the node you open.

    How it works (and where it differs)

    Same engine as the rest of the pack: your prompt plus a level-specific system prompt go into a chat completion on the GGUF model, and the output is aggressively cleaned - <think> blocks stripped, duplicate tags removed, list capped at 50. The one real difference is lifecycle. This node loads the model itself on every single execution at a fixed 4096-token context, and deletes it when it's done. Self-contained, but it means every run reloads the whole model before it writes a single tag.

    That reload is the tradeoff, and it's the entire reason the pack also ships the two-node path. Use this one for a quick test or a single translation. If you're iterating - and you will be, because that's what tuning a prompt is - switch to LoadLLMModel + PromptEnhancerFromModel, where the load happens once and runs are instant.

    The inputs

    • prompt - your rough idea in any language the model supports. The placeholder text is Spanish, which tells you a lot about who this pack was written for.
    • llm_model - dropdown of the .gguf files in models/LLM. Shows no_models_found until you actually drop one in.
    • enhancement_level - basic (translate + minimal quality tags), detailed (adds lighting, camera, composition; the default), or creative (art-director rewrite with styles and effects).
    • n_gpu_layers - GPU offload, -1 = all layers. Set 0 to force CPU when the diffusion model needs the VRAM.
    • max_tokens (256), temperature (0.7), seed (-1 = random) - the LLM dials. Raise max_tokens if rewrites arrive cut off; fix a seed for reproducible results.

    Outputs

    enhanced_prompt - the translated, enhanced tag list; feed it into CLIP Text EncodeKSampler. original_prompt - your input echoed back, handy for comparison or for keeping the source around.

    Install and troubleshooting

    cd ComfyUI/custom_nodes
    git clone https://github.com/ezetojo/ComfyUI-PromptTranslatorEnhancer
    pip install llama-cpp-python
    # GPU build: CMAKE_ARGS="-DGGML_CUDA=on" pip install llama-cpp-python --force-reinstall --no-cache-dir
    

    Or search "Prompt Translator & Enhancer" in ComfyUI Manager. Then put a GGUF in ComfyUI/models/LLM/. Recommended picks from the README: Qwen3-4B-Instruct-Q4_K_M, Qwen2.5-3B-Instruct, or Phi-3-mini-4k-instruct - Q4_K_M quants, all Instruct/Chat models.

    The gotchas are the pack's shared ones. A no_models_found dropdown means the model isn't in models/LLM - restart to rescan. On Windows, llama-cpp-python has no official wheels for ComfyUI's bundled Python, so grab a prebuilt wheel or build with the CUDA flags above. And vision-language models like Qwen3VL are rejected by design - this is a text-only node, and the filter is doing its job.

    One last thing, because it will trip you up: the pause before each result isn't the translation thinking - it's the model reloading. That's normal here, and exactly why the reusable variant exists once you move past one-off translations.

    CategoryLLM/Prompt Enhancement

    Inputs (7)

    NameTypeDefaultDescription
    promptSTRING
    llm_modelCOMBOno_models_found1 options: no_models_found
    enhancement_levelCOMBOdetailed3 options: basic, detailed, creative
    n_gpu_layersINT-1-1–100
    max_tokensINT25632–1024
    temperatureFLOAT0.700–2
    seedINT-1-1–2147483647

    Outputs (2)

    NameTypeDescription
    enhanced_promptSTRING
    original_promptSTRING