Nodes/ComfyUI_ComfyGroq/GROQ LLM (Advanced)
ComfyUI Node

GROQ LLM (Advanced)

What it's really doing (and why it won't run yet)

By downlifted·Created 11 months ago·Updated 11 months ago· 0
GROQ LLM (Advanced)
  • context_documents
  • response
api_key
modelllama3-70b-8192
prompt
system_messageYou are a helpful AI assistant with deep knowledge and analytical skills.
conversation_history
temperature0.70
max_tokens1024
top_p0.90
frequency_penalty0.0
presence_penalty0.0
seed-1
format_outputmarkdown
enable_function_callingfalse
stop_sequences

Let's start with the part the marketing skips: this node, as shipped, almost certainly won't run on your ComfyUI. It's called "GROQ LLM (Advanced)" and it looks like a full-featured text generation widget, but the actual code behind it is a wrapper around a single API call - and even that call never gets reached because the function's signature doesn't match the inputs the UI hands it. I'll explain what it's for first, because the idea is genuinely useful, and then show you exactly where it falls over.

What it's reaching for

GROQ is a cloud inference provider known for stupid-fast responses on open models - their LPU hardware runs Llama and Mixtral far faster than any local setup you own, and there's a free tier. The appeal inside ComfyUI: an LLM in the loop without loading a model into VRAM. You've seen the pattern in the ecosystem - an LLM that expands a terse prompt into a rich one, names your LoRA, or writes image descriptions - feeding an LLM-encoded text model that's now the norm for local generation. This node is that idea: type a prompt, get text back, wire it into your graph.

No model files, no VRAM cost, no GPU hit. The only "model" is an API key from console.groq.com, pasted into the node or set as GROQ_API_KEY.

How it's built

The mechanism is plain: the node constructs a groq client and calls client.chat.completions.create with a system message, your prompt, and the standard sampling knobs - temperature, max_tokens, top_p. That's it. It's a thin, honest wrapper around the Groq SDK, which is why the dependency list is a single package: pip install groq. The models in the dropdown (llama3-70b-8192, llama3-8b-8192, mixtral-8x7b-32768) are hardcoded from an older Groq catalog - worth remembering, because GROQ has since renamed and retired some of those IDs.

The inputs you'd actually touch: api_key, model, prompt, system_message, temperature (0–2, lower is more deterministic), max_tokens, and top_p. The output is a single response string - run it into a text display node to read it, or into a prompt-prep / text-encode stage to feed generation.

Install

ComfyUI Manager is the easy path - search "GROQ" or "ComfyGroq" (the pack's title). Or the manual way:

cd ComfyUI/custom_nodes
git clone https://github.com/downlifted/ComfyUI_GROQ-PromptWizard
pip install groq

Then restart ComfyUI. A heads-up: the pack's README still shows a placeholder clone URL (yourusername/ComfyUI_ComfyGroq.git) - use the real repo above.

The part nobody mentions

Here's the trap. The UI exposes a dozen-plus fields - conversation_history, frequency_penalty, presence_penalty, format_output, enable_function_calling, stop_sequences, context_documents, even a seed. But the node's generate() method only accepts eight parameters, so when ComfyUI calls it with all the inputs it declared, Python throws TypeError: got an unexpected keyword argument before a single token is generated. The "Advanced" label is aspirational: most of those knobs are decoration even in the best case. The seed seeds torch/numpy/random - meaningless for a cloud API.

This is a one-commit, zero-impression pack from an early-stage author. The core idea is sound and the API call is legitimately written; it just isn't finished. If you want LLM-in-the-loop today, call the Groq SDK directly, or use one of the maintained LLM node packs that's been battle-tested by the community. And if you do install this one, check the repo for updates - a fixed function signature would change the story completely.

CategoryComfyGroq/Text

Inputs (15)

NameTypeDefaultDescription
api_keySTRINGYour GROQ API key. Leave empty to use GROQ_API_KEY environment variable.
modelCOMBOllama3-70b-8192LLaMA 3 70B: Meta's 70B parameter model, great for complex tasks
promptSTRINGYour input prompt or question
system_messageSTRINGYou are a helpful AI assistant with deep knowledge and analytical skills.System message to guide the model's behavior
conversation_historySTRINGPrevious conversation history (format: 'user: message assistant: response')
temperatureFLOAT0.700–2Lower values make output more deterministic, higher more creative
max_tokensINT10241–8192Maximum number of tokens to generate
top_pFLOAT0.900.1–1Nucleus sampling: consider only the top tokens with cumulative probability >= top_p
frequency_penaltyFLOAT0.0-2–2Positive values penalize new tokens based on existing frequency
presence_penaltyFLOAT0.0-2–2Positive values penalize new tokens based on whether they appear in the text so far
seedINT-1-1–4294967295Random seed (-1 for random)
format_outputCOMBOmarkdownFormat for the output
enable_function_callingBOOLEANfalse
context_documentsoptLIST
stop_sequencesoptSTRING

Outputs (1)

NameTypeDescription
responseSTRING