ComfyUI Node

Grok 4.3

A full LLM node that needs a messages builder to talk to

By Runware·Created 2 years ago·Updated about a month ago· 140
Grok 4.3
  • messages
  • text
seed0
numberResults1
includeUsagefalse
settings.maxTokensfalse
settings.maxTokens_value1
settings.temperature1.00
settings.thinkingLevellow
toolChoicefalse
toolChoice.name
toolChoice.type(default)
settings.topP1.00
outputFormatTEXT
advanced_json

Yes, that's a Grok node in your ComfyUI graph. Runware's catalog isn't just diffusion models - it's an inference aggregator, and xAI's Grok 4.3 rides along as a text-generation node (xai:[email protected], textInference) that returns a plain STRING. If you've been building ComfyUI pipelines that need an LLM step - prompt enhancement, tagging, a caption that feeds back into a sampler - this is a way to get a frontier model into that graph without running it locally (which you basically can't) and without leaving ComfyUI for a browser tab.

The one thing that will trip you up immediately: the messages input is required and it's not a text box. It's a typed RUNWARE_MESSAGES socket, which means you build the conversation with the Runware/Params → Messages builder - one node per message, with role (user or assistant) and content (the text). Wire a Messages builder into the socket and you've got a conversation. This is the pack's whole design philosophy: stackable builders wire into model nodes, so a chat history is just a chain of message nodes. It's more nodes than a chat box, but it's also the same mental model as everything else in ComfyUI.

How it works

Standard pack plumbing: the node builds a request, sends it over REST through the runware-sdk, and joins any returned text into the text output as a STRING. The sampling knobs are real LLM knobs: settings.temperature (default 1) controls randomness, settings.topP (default 1) controls nucleus sampling, and settings.maxTokens is a gated toggle - flip it on to reveal the max-token value field. includeUsage will add token-usage stats to the response if you care about cost accounting.

The inputs that matter

  • messages (required) - the conversation, built with Messages builders. Start with a user message.
  • settings.temperature - determinism dial. Lower for reproducible outputs, higher for variety.
  • settings.topP - diversity by probability mass; leave at 1 until you have a reason.
  • toolChoice - gated; enable it to force tool calling, with toolChoice.type (strategy) and toolChoice.name (the specific tool). This is where you'd wire agent-style behavior.
  • seed / numberResults - for reproducible or multiple answers.
  • advanced_json - the escape hatch for tools (define function schemas as raw JSON merged into the request).

Output is text (STRING) - wire it into a Show Text node, or anywhere your workflow consumes a string. There's no native chat-streaming UI here; it's a request-and-return node.

Install and API key

Install once for the whole pack:

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

Restart ComfyUI (or install Runware from ComfyUI Manager). API key from runware.ai/api-keys, set in ComfyUI Settings → Runware API key, exported as RUNWARE_API_KEY, or via runware auth login.

Gotchas

The messages-builder requirement is where people get stuck, so repeat after me: no text box - build messages. Second, LLM calls on a metered API are billed by token, and a chat that runs in a loop (e.g., "improve this prompt, then pass it to the sampler, then critique the result") can quietly rack up spend; includeUsage exists precisely so you can see it. Third, settings.maxTokens is off by default, which is fine for short outputs but means a long-winded answer is governed by the model's default cap - if your responses get truncated mid-idea, that's the gate to open. Grok is a chatty model; budget accordingly.

CategoryRunware/Text/xai

Inputs (14)

NameTypeDefaultDescription
messagesRUNWARE_MESSAGES
seedoptINT00–9223372036854776000Random seed for reproducible generation. When not provided, a random seed is generated in the unsigned 32-bit range.
numberResultsoptINT11–4Number of results to generate. Each result uses a different seed, producing variations of the same parameters.
includeUsageoptBOOLEANfalseInclude token usage statistics in the response.
settings.maxTokensoptBOOLEANfalseEnable to set settings.maxTokens. Off uses the model's default.
settings.maxTokens_valueoptINT1Maximum number of tokens to generate in the response.
settings.temperatureoptFLOAT1.000–2Controls randomness in generation. Lower values produce more deterministic outputs, higher values increase variation and creativity.
settings.thinkingLeveloptCOMBOlowControls the depth of internal reasoning the model performs before generating a response.
toolChoiceoptBOOLEANfalseEnable to set toolChoice. Off uses the model's default.
toolChoice.nameoptSTRINGName of the specific tool the model must call. Required when type is `tool`.
toolChoice.typeoptCOMBO(default)Strategy the model uses to decide when and which tools to call.
settings.topPoptFLOAT1.000–1Nucleus sampling parameter that controls diversity by limiting the probability mass. Lower values make outputs more focused, higher values increase diversity.
outputFormatoptCOMBOTEXTOutput format for the generated text.
advanced_jsonoptSTRINGOptional JSON merged into the request. For: tools

Outputs (1)

NameTypeDescription
textSTRING