Nodes/ComfyUI-mnemic-nodes/βœ¨πŸ’¬ Groq LLM API
ComfyUI Node

βœ¨πŸ’¬ Groq LLM API

Groq LLM API β€” ComfyUI Node Guide

By MNeMoNiCuZΒ·Created 3 years agoΒ·Updated 17 days agoΒ· 105
βœ¨πŸ’¬ Groq LLM API
    • api_response
    • success
    • status_code
    β—„modelβ–Ύβ–Ί
    β—„presetβ–Ύβ–Ί
    β—„system_messageβ–Ί
    β—„user_inputβ–Ί
    β—„temperature0.85β–Ί
    β—„max_tokens1024β–Ί
    β—„top_p1.00β–Ί
    β—„seed42β–Ί
    β—„max_retries2β–Ί
    β—„stopβ–Ί
    β—„json_modefalseβ–Ί

    Groq isn't a model - it's an inference host, known in the community mostly for one thing: absurd speed, plus a genuinely free API tier, running open models like Llama, Gemma, Kimi and others on custom hardware instead of GPUs. That reputation is why nodes built around it keep showing up across the ComfyUI ecosystem - you get LLM output without eating your own VRAM or paying OpenAI prices, and it comes back fast enough to feel usable inside a generation loop rather than a separate step you do in a browser tab first.

    This node is a straightforward "call an LLM, get text back" node, but the preset list gives away exactly what it's built for: entries like "Generate a Flux.2 prompt about [user_input]," "Generate an LTX-2 video prompt about [user_input]," and "Generate a Z-image prompt from [user_input]" aren't generic - they're system-message templates tuned for the specific model families people are actually prompting right now. That fits a real, fast-growing pattern: dedicated prompt-writing has gone from a fringe habit to a mainstream one as image models moved from parsing tags to parsing instructions, and having an LLM translate what you want into the structure a given model expects is just two things that speak the same language talking to each other. If your presets don't cover what you need, the tooltip points you at a UserPrompts.json file in the pack for adding your own.

    What you're setting: model picks from Groq's hosted catalog - a long list that includes general chat models (gpt-oss-120b, kimi-k2-instruct, deepseek-r1-distill-llama-70b, various Llama sizes) alongside a couple of moderation/safety models (llama-guard-3-8b and similar) that exist for content filtering, not creative writing - skip those unless that's specifically what you're doing. preset picks the system-message template; choose "Use [system_message] and [user_input]" if you want to write your own instructions instead of a built-in one. user_input is your actual request text, system_message is your custom instruction when you're not using a preset. temperature and top_p control randomness the usual way - lower for focused/predictable output, higher for variety. max_tokens caps response length, seed nudges toward reproducibility (like most hosted LLM APIs, a fixed seed makes repeat runs more similar, not guaranteed identical), and max_retries controls how many times the node retries on a failed call before giving up. json_mode forces structured JSON output, but - stated directly in the tooltip, not a guess - it only works if the literal word "JSON" appears somewhere in your prompt; flip it on without that and you'll get inconsistent results.

    Outputs: api_response is the generated text - usually what you're routing straight into a CLIP Text Encode or another downstream text node. success is a boolean pass/fail, and status_code gives you the HTTP status as a string - check both before trusting api_response blindly in an automated pipeline, since a failed call still produces some output field.

    Setup is different from every other node in this pack. Groq nodes need an API key, and the README is explicit about the steps: copy .env.example to .env in the pack's own root directory (not ComfyUI's root), open it in a text editor, and paste your key in. Skip this step and every call will fail - check success/status_code first if nothing's coming back. Beyond that, install is standard: ComfyUI Manager, search "ComfyUI-mnemic-nodes," or git clone https://github.com/MNeMoNiCuZ/ComfyUI-mnemic-nodes into custom_nodes, then restart.

    What actually breaks: the .env step above is the number one cause of a silent failure. Free-tier API access also means you should expect throttling if you're hammering it in a tight batch loop - this isn't a dedicated paid endpoint. And json_mode failing to produce clean JSON is almost always the missing literal word "JSON" in your prompt, not a bug in the node.

    Category⚑ MNeMiC Nodes

    Inputs (11)

    NameTypeDefaultDescription
    modelCOMBOSelect the Large Language Model (LLM) to use.
    presetCOMBOSelect a preset or custom prompt for guiding the LLM.
    system_messageSTRINGOptional system message to guide the LLM's behavior.
    user_inputSTRINGUser input or prompt to generate a response from the LLM.
    temperatureFLOAT0.850.1–2Controls randomness in responses. A higher temperature makes the model take more risks, leading to more creative or varied answers. A lower temperature (closer to 0.1) makes the model more focused and predictable.
    max_tokensINT10241–131072Maximum number of tokens to generate in the response.
    top_pFLOAT1.000.1–1Limits the pool of words the model can choose from based on their combined probability. Set it closer to 1 to allow more variety in output. Lowering this (e.g., 0.9) will restrict the output to the most likely words, making responses more focused.
    seedINT420–4294967295Seed for random number generation, ensuring reproducibility.
    max_retriesINT21–10Maximum number of retries in case of request failure.
    stopSTRINGStop generation when the specified sequence is encountered.
    json_modeBOOLEANfalseEnable JSON mode for structured output. IMPORTANT: Requires you to use the word 'JSON' in the prompt.

    Outputs (3)

    NameTypeDescription
    api_responseSTRINGThe API response. This is the text generated by the model
    successBOOLEANWhether the request was successful
    status_codeSTRINGThe status code of the request