Nodes/Prompt Tools/Prompt Helper
ComfyUI Node

Prompt Helper

A local LLM writes your FLUX, SDXL and Pony prompts for you

By wernerberHH·Created 4 months ago·Updated 15 days ago· 1
Prompt Helper
    • enhanced_prompt
    • original_prompt
    prompt
    modeFLUX Kontext (Scene Edit)
    engineollama
    base_urlhttp://localhost:11434
    model[ollama] qwen3-vl:8b
    temperature0.7
    keep_alive30s
    custom_system_prompt
    ethnicity_poolEuropean East Asian South Asian Southeast Asian Latin American African Middle Eastern Mixed heritage
    age_pool22-45
    mood_poolconfident playful serene intense thoughtful warm mysterious relaxed
    hair_poollong straight shoulder-length wavy short pixie cut long curly braided bob cut long wavy short textured
    lighting_pool
    setting_pool
    outfit_style_pool

    The name is not a lie, which is rarer than it should be in this ecosystem. You type "a young woman in a cafe, rainy window, late afternoon" into PromptHelper and it hands back a prompt that's actually shaped for the model you're about to run - a FLUX Kontext edit instruction, a long Z-Image description, comma-separated SDXL phrases, or a booru tag list with score tags for Pony. It's the "LLM writes your prompt" pattern done properly, and it's the node I'd reach for first out of the comfyui-prompt-tools pack.

    Why it works so well: if the checkpoint's own encoder is a language model (Qwen3 on Z-Image, T5/instruction models on FLUX Kontext), then having a second LLM write that instruction is just translating between two things that speak the same language. The blank-page problem - sitting there with an empty prompt box - is the thing this kills.

    How it works

    There's no bundled model. PromptHelper is a thin client: it takes your short prompt, loads a mode-specific system prompt, sends both to an LLM, strips the "Sure, here is your enhanced prompt:" noise, and returns the cleaned rewrite. The engine selector is shared across the whole pack and offers five backends - Ollama (local, no key), vLLM (local, OpenAI-compatible), OpenAI, Claude via OpenRouter (marked experimental by the author, untested), and Gemini. Default is Ollama with qwen3-vl:8b, which is a vision model doing text duty; it works fine, though a plain llama3.2:3b or gemma2:2b is lighter if you're on low VRAM.

    The mode dropdown is the whole product. Eleven modes, each with a hand-written system prompt encoding real output rules. FLUX Kontext (Scene Edit) forces action verbs, "ensure correct human anatomy", and "preserve the same facial features" - the exact scaffolding people forget. LTX-2.3 Video (Audio-Video) demands explicit motion and camera behavior plus a synchronized audio line, because LTX ignores negation and invents camera moves otherwise. SDXL Pony/Illustrious switches to booru-style tags. The two Random Character modes pull from configurable pools (ethnicity_pool, age_pool, mood_pool, hair_pool, plus optional lighting, setting, outfit_style) and force a fresh pick on every queue - the node returns NaN from IS_CHANGED so ComfyUI can't cache the result. Nice touch for bulk character ideation.

    The inputs that matter

    • prompt - your rough idea, the one thing you actually write.
    • mode - the model family you're targeting. Pick this before the engine.
    • engine / base_url / model - must match each other. The dropdowns are a combined list across all engines (ComfyUI can't filter them), so picking ollama with an OpenAI URL is on you, and it surfaces as a connection error at runtime.
    • temperature (default 0.7) - lower it if the output wanders off into invented detail.
    • custom_system_prompt - override the mode's system prompt entirely, for the tinkerers.

    Two outputs: enhanced_prompt (the rewrite) and original_prompt (your input echoed back, handy for comparing or logging). Wire enhanced_prompt into your CLIPTextEncode positive - or into a TextMux if you want an AI/manual override switch in the same pack.

    Installing

    Via ComfyUI Manager, search comfyui-prompt-tools (display name "Prompt Tools"). Or manually:

    cd /path/to/ComfyUI/custom_nodes
    git clone [email protected]:wernerberHH/comfyui-prompt-tools.git
    pip install pyyaml   # optional - enables the URL/model autocomplete dropdowns
    

    Then restart. The one dependency is pyyaml, and it's genuinely optional - without it the URL and model fields degrade to plain text inputs and the nodes still work. No model downloads: the LLM lives in your Ollama/vLLM server (ollama pull qwen3-vl:8b) or behind an API key you enter in Settings → PromptTools.

    Common issues

    Engine/URL/model mismatch is the #1 runtime error - match the three fields. If ComfyUI runs in Docker with default bridge networking, it can't reach your Ollama on the host as localhost; use network_mode: host or host.docker.internal (the README calls this out explicitly). Expect subject drift from small models - an 8B enhancer adds detail you didn't ask for, and chaining narrowly-scoped steps drifts less than one free rewrite. And the usual caveat for any LLM node: it's arbitrary Python with network access, so read what a fresh pack does. This one is MIT-licensed and keeps API keys in a 0600 gitignored file that never leaves your host, which is more than most.

    Categoryprompt

    Inputs (15)

    NameTypeDefaultDescription
    promptSTRING
    modeCOMBOFLUX Kontext (Scene Edit)11 options: FLUX Kontext (Scene Edit), FLUX Kontext (Couple Scene), Qwen Image Edit (Couple Scene), FLUX Text-to-Image, Z-Image Text-to-Image, SDXL Photorealistic, +5
    engineCOMBOollamaollama: local Ollama server (no API key needed) vllm: local OpenAI-compatible server (vLLM, sglang, LM Studio, ...) openai: ChatGPT — needs OPENAI_API_KEY claude: Anthropic via OpenRouter — needs OPENROUTER_API_KEY gemini: Google Gemini — needs GEMINI_API_KEY
    base_urlCOMBOhttp://localhost:114345 options: http://localhost:11434, http://localhost:8000/v1, https://api.openai.com/v1, https://openrouter.ai/api/v1, https://generativelanguage.googleapis.com/v1beta/openai/
    modelCOMBO[ollama] qwen3-vl:8b6 options: [ollama] gemma2:2b, [ollama] llama3.2:3b, [ollama] qwen3-vl:32b, [ollama] qwen3-vl:8b, [vllm] Qwen/Qwen2.5-7B-Instruct, [vllm] Qwen/Qwen2.5-VL-7B-Instruct
    temperatureFLOAT0.70–2
    keep_aliveSTRING30s
    custom_system_promptoptSTRING
    ethnicity_pooloptSTRINGEuropean East Asian South Asian Southeast Asian Latin American African Middle Eastern Mixed heritage
    age_pooloptSTRING22-45
    mood_pooloptSTRINGconfident playful serene intense thoughtful warm mysterious relaxed
    hair_pooloptSTRINGlong straight shoulder-length wavy short pixie cut long curly braided bob cut long wavy short textured
    lighting_pooloptSTRING
    setting_pooloptSTRING
    outfit_style_pooloptSTRING

    Outputs (2)

    NameTypeDescription
    enhanced_promptSTRING
    original_promptSTRING