Nodes/SDXL Auto Prompter/APNext Groq Text Generator
ComfyUI Node

APNext Groq Text Generator

Fast, cheap prompt expansion on Groq's LPUs

By dagthomas·Created 3 years ago·Updated 17 days ago· 285
APNext Groq Text Generator
    • STRING
    input_text
    happy_talktrue
    compressfalse
    compression_level
    posterfalse
    groq_modelllama-3.3-70b-versatile
    seed-1
    randomize_each_runtrue
    custom_base_prompt
    custom_title
    override
    variation_instructionGenerate different creative variations each time while maintaining the core concept.

    Groq - note the q, not xAI's Grok with a k, they are constantly confused - runs open models like Llama on custom inference hardware, and the pitch is speed. GroqTextNode (APNext Groq Text Generator) is this pack's fast lane for prompt writing: hand it input_text, it hits the Groq API, and you get an expanded prompt back as a STRING, usually in a blink. It's the one I'd reach for when I'm iterating and don't want to feel the API latency between queues.

    Like the rest of the pack's LLM nodes, it exists because prompt writing turned into a node instead of a browser tab. Modern image models read your prompt as an instruction through a general-purpose LLM, so letting an LLM draft that instruction is a natural fit. The bonus with Groq specifically: it's fast, and the models it serves (Llama, Qwen, Kimi, GPT-OSS) are cheap or free-tier, so the running cost of iterating is low.

    How it works

    It's an API client - nothing runs on your GPU. You give it text, Groq's LPUs run an open model, text comes back. The groq_model dropdown lists what Groq currently serves: llama-3.3-70b-versatile (the sensible default), the fast llama-3.1-8b-instant, Groq's own compound models, Llama 4 Scout/Maverick, Kimi K2, GPT-OSS, Qwen3. For prompt expansion, the 70B versatile or the 8B instant are both fine - instant is faster, 70B is a touch smarter.

    Shared style controls, same as the GPT and Grok nodes:

    • happy_talk (on) - enthusiastic vs. flat tone.
    • compress + compression_level (soft / medium / hard) - shorten the output. Use it; these models happily over-write.
    • poster - poster-style formatting, off by default.

    seed, randomize_each_run, and variation_instruction drive per-queue variation; custom_base_prompt / override let you replace the built-in system prompt. One STRING output into your positive text encode.

    Installing it

    ComfyUI Manager: search comfyui_dagthomas, install, restart. Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/dagthomas/comfyui_dagthomas
    cd comfyui_dagthomas
    pip install -r requirements.txt
    

    The install pulls the pack's full dependency set (the whole multi-provider stack), not just what this node uses - the usual price for a bundle that covers a dozen backends.

    Then export your GROQ_API_KEY before launching ComfyUI. Groq's free tier is generous enough that this is often the cheapest cloud node in the pack to actually run.

    Common issues

    Confused it with Grok. Easy to do. Groq (q) = the fast-inference company serving open models, key GROQ_API_KEY. Grok (k) = xAI's model, key XAI_API_KEY. Wrong key, wrong node, runtime error.

    Rate limited. The free tier has per-minute token and request caps, and a big batch will trip them. Either slow the batch down or move to the 8B instant model, which burns fewer tokens per call.

    "Model decommissioned." Groq rotates its hosted models fairly aggressively. If a name errors, pick a current one from the dropdown, or edit the pack's groq_models.json to match - the node tries the live API list first and falls back to that file, so keeping it current fixes stale dropdowns after a restart.

    Categorycomfyui_dagthomas/LLM

    Inputs (12)

    NameTypeDefaultDescription
    input_textSTRING
    happy_talkBOOLEANtrue
    compressBOOLEANfalse
    compression_levelCOMBO3 options: soft, medium, hard
    posterBOOLEANfalse
    groq_modelCOMBOllama-3.3-70b-versatile12 options: llama-3.3-70b-versatile, llama-3.1-8b-instant, groq/compound, groq/compound-mini, meta-llama/llama-4-maverick-17b-128e-instruct, meta-llama/llama-4-scout-17b-16e-instruct, +6
    seedINT-1-1–18446744073709550000
    randomize_each_runBOOLEANtrue
    custom_base_promptoptSTRING
    custom_titleoptSTRING
    overrideoptSTRING
    variation_instructionoptSTRINGGenerate different creative variations each time while maintaining the core concept.

    Outputs (1)

    NameTypeDescription
    STRINGSTRING