Nodes/Jurdns Groq API Node/Jurdn's Groq API Prompt Enhancer
ComfyUI Node

Jurdn's Groq API Prompt Enhancer

Prompt enhancement with zero VRAM — this node just needs a free Groq key

By jurdnisglobby·Created 2 years ago·Updated 2 years ago· 2
Jurdn's Groq API Prompt Enhancer
    • enhanced_text
    text
    override_system_prompt

    You type "spooky castle at night," the node hands back four sentences of cinematic lighting, mood, and camera detail, and that goes straight into your ClipTextEncode. That's the whole deal with Jurdn's Groq API Prompt Enhancer: it's a one-node pack that outsources prompt writing to an LLM running on Groq's servers, not on your machine.

    LLM-assisted prompting stopped being a browser-tab hobby a while back - it's now the default way people write prompts for the LLM-encoded models like Flux and Anima, where an LLM writing the instruction is just translating between two systems that speak the same language. The node is worth reaching for precisely because you don't need a second model eating VRAM or a local LLM to babysit. Type, run, wire, done.

    How it actually works

    The node is a thin wrapper around Groq's chat-completions API. On startup it reads a groq_config.json sitting next to the node's Python file, which holds three things: your api_key, the model (defaults to gemma2-9b-it), and a system_prompt. When you queue it, your text plus that system prompt goes to Groq, and the model's reply comes back as the enhanced_text string. Parameters like temperature (0.5) and max tokens (1024) are hardcoded in the source - there's no temperature dial on the node, so don't go hunting for one.

    The default system prompt is the load-bearing part. It tells the model to only return the improved prompt - no "here's an enhanced version!" preamble, no offer to iterate. That's the thing that breaks on every custom prompt-enhancement setup, and it's why the author says to keep that instruction if you write your own.

    The inputs that matter

    There are only two, which is refreshing:

    • text (required, multiline) - your rough prompt. This is the only thing you'll touch most of the time.
    • override_system_prompt (optional, multiline) - replaces the config's system prompt just for this node instance. Handy when one workflow wants tag-style output and another wants sentences, without editing the shared file.

    Output is a single enhanced_text string. Route it into a ClipTextEncode to generate, or into a text/Show node first to see what the LLM actually wrote - you'll want to check it once before you trust it.

    Installing it

    ComfyUI Manager is the easy path: search for Jurdns Groq API Node, install, restart. Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/jurdnisglobby/ComfyUI-Jurdns-Groq-Node
    

    The only Python dependency is the groq package (the requirements file is literally that one line), which Manager installs for you - manual installs need pip install groq in ComfyUI's Python env. No model downloads, no heavy dependencies; the LLM lives on Groq's side.

    Then the bit people skip: open ComfyUI/custom_nodes/ComfyUI-Jurdns-Groq-Node/groq_config.json and replace YOUR_GROQ_API_KEY with a real key from console.groq.com/keys. Groq's free tier is genuinely free and genuinely fast - that's been its selling point since launch - so this whole setup costs you nothing at hobby scale. The README recommends Gemma and Llama; if you want to swap, change the model field.

    Where people get burned

    The node returns errors as output text, not exceptions. No API key? The output is literally the string "Error: API key not configured. Please edit groq_config.json". Timeout or connection blip? Same deal, as a string. Wire the output into a Show node and read it, or you'll think a run "succeeded" and silently feed an error message into your encoder. If your config file is corrupt, the node recreates it with defaults and prints a note to the console.

    If you write your own system prompt and the output starts sounding like a chat response, that's the missing "respond only with the prompt" instruction - the author's default is the bare minimum on purpose. And since this is a cloud API, your prompt text leaves your machine; fine for hobby art, not something to pipe proprietary or private content through.

    It's a one-trick node, but the trick is solid: free prompt enhancement with zero local cost, done.

    CategoryGroq-Node

    Inputs (2)

    NameTypeDefaultDescription
    textSTRING
    override_system_promptoptSTRING

    Outputs (1)

    NameTypeDescription
    enhanced_textSTRING