ComfyUI Node

Groq Chat

Groq Chat

By yiwangsimple·Created 2 years ago·Updated about a year ago· 89
Groq Chat
    • STRING
    model
    prompt
    max_tokens1000
    temperature0.7
    top_p1.0
    system_message
    presence_penalty0.0
    frequency_penalty0.0
    reset_conversationfalse

    Groq Chat is the node this whole pack is named after, and it exists for one reason: Groq's cloud API is stupidly fast. The README brags that it can turn a theme into positive and negative prompts in about two seconds, and that's not marketing. Groq runs models on custom LPU hardware built for inference, so llama-3.1-70b answers while you're still blinking. It's an LLM call with a free tier and no GPU on your side - a genuinely handy way to get LLM-assisted prompting into a workflow without renting a 4090.

    The node is just a thin wrapper over the groq Python SDK. You type a prompt, it sends it to https://api.groq.com with whatever model you picked, and hands the text back as a STRING output. The trick worth knowing: it's multi-turn by default. The node keeps a conversation_history on itself, so every run appends your prompt and the model's reply. Turn on reset_conversation when you want a clean single-turn call (the README recommends True for one-shot prompt generation). History lives on the node instance, so dragging out a fresh node also resets it.

    The inputs that matter:

    • model - 17 choices, from the old faithfuls (llama3-8b-8192, mixtral-8x7b-32768, gemma-7b-it) through llama-3.1-70b-versatile and the llama-3.2-* previews. If you want raw speed over quality, a 8b-class model at 8192 context is the sweet spot.
    • prompt - the user message, multiline.
    • temperature / top_p - the README spends a whole essay on these. Lower temperature for consistent prompt tags, higher for variety. Start at the defaults (0.7 / 1.0) and only touch one at a time.
    • system_message, presence_penalty, frequency_penalty - optional. Presence/frequency penalties are for stopping repetition or forcing new topics; leave both at 0 unless the model is looping.
    • Output: one STRING. Wire it into a text preview node, or feed it to this pack's Prompt Extractor to split out positive/negative halves.

    Installing it

    Install the whole pack once and you get every node in this family:

    cd ComfyUI/custom_nodes
    git clone https://github.com/yiwangsimple/ComfyUI_GroqChat
    

    then restart ComfyUI. Or use ComfyUI Manager and search for "ComfyUI_DW_Chat". The groq dependency installs from requirements.txt, but the API key is up to you: copy api_key.ini.example to api_key.ini in the pack folder and drop your key from console.groq.com/keys in the GROQ_API_KEY slot under [API_KEYS].

    Where people get burned

    The most common failure is an error string that starts "GROQ_API_KEY not found" - the node swallows the exception and returns it as text. Check that api_key.ini is in the pack root (same folder as api_utils.py), not in your ComfyUI root. Second: if the conversation feels like it's ignoring your prompt, you've hit the multi-turn behavior - flip reset_conversation to True. And Groq's free tier has rate limits (the README links a screenshot of them); if you batch-generate a hundred prompts in a row you'll start getting 429s returned as error text. Slow down or buy a key.

    One honest caveat: a pack this broad is a grab-bag, and this is the cleanest node in it. If you only install one thing from ComfyUI_GroqChat, make it this.

    Category🌙DW/Chat

    Inputs (9)

    NameTypeDefaultDescription
    modelCOMBO17 options: deepseek-r1-distill-llama-70b, gemma-7b-it, gemma2-9b-it, mixtral-8x7b-32768, llama3-8b-8192, llama3-70b-8192, +11
    promptSTRING
    max_tokensINT10001–32768
    temperatureFLOAT0.70–2
    top_pFLOAT1.00–1
    system_messageoptSTRING
    presence_penaltyoptFLOAT0.0-2–2
    frequency_penaltyoptFLOAT0.0-2–2
    reset_conversationoptBOOLEANfalse

    Outputs (1)

    NameTypeDescription
    STRINGSTRING