ComfyUI Node

Gemini 3.1 Pro

The thinking model for the hard parts of your workflow

By Runware·Created 2 years ago·Updated about a month ago· 140
Gemini 3.1 Pro
  • messages
  • images
  • text
seed0
numberResults1
includeUsagefalse
settings.maxTokens4096
settings.systemPrompt
settings.temperature1.00
settings.thinkingLevelhigh
toolChoicefalse
toolChoice.name
toolChoice.type(default)
settings.topPfalse
settings.topP_value0.00
outputFormatTEXT
advanced_json

Gemini 3.1 Pro is the heavyweight of the pack's text nodes: Google's flagship reasoning model, hosted by Runware, dropped into your ComfyUI graph as a node. You reach for it when the task actually deserves a thinking model - complex multi-step planning, debugging a prompt that keeps going sideways, structured reasoning over a long context. It's the most expensive text call in the pack and it's worth every cent of the difference on the jobs where the cheap models hand you nonsense.

The tell-tale dial is settings.thinkingLevel (low/medium/high, defaulting to high): this model reasons before it answers, and you're paying for those reasoning tokens. If your task doesn't need them, you're overspending - that's the workflow discipline this node demands. Use high thinking for the hard jobs and drop it to low for the mechanical ones, and the per-call cost follows.

What you set

  • messages (required) - from the Runware Messages builder: role + content pairs, chained for multi-turn reasoning.
  • images - optional IMAGE input; Pro vision is genuinely strong at describing complex scenes.
  • settings.thinkingLevel - the headline knob: low/medium/high.
  • settings.maxTokens - up to 128000, the biggest cap in the text family.
  • settings.systemPrompt - long-context instructions land well here.
  • settings.temperature (0–2, default 1) - and settings.topP, which is gated on this node (enable the toggle, then set the value).
  • toolChoice - gated tool-calling for structured automation.
  • includeUsage - token stats in the response.

Output is text, a STRING. advanced_json covers extra inputs, stop sequences, and tools.

How it works

Standard pack flow: taskType: textInference over REST via the Runware SDK, reply back as a string, cost on the title bar. What's different is what happens before the reply: the thinking pass. With high thinking enabled the model internally reasons through the problem, and those tokens are part of what you're billed for. That's the feature and the budget line item - plan your thinking level per task, not per workflow.

Installing

ComfyUI Manager → search Runware → install → restart. Manual:

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

No model downloads; deps are runware-sdk, pillow, soundfile. API key via Settings → Runware API key, RUNWARE_API_KEY, or runware auth login.

Troubleshooting

The classic mistake is leaving thinkingLevel on high for every call and watching the bill climb - dial it per task. Slow responses? High thinking takes time by design; drop to low when latency matters more than reasoning. And if the model over-explains in its answer, that's the systemPrompt's job to fix: "answer in one sentence, no preamble." When you need cheaper throughput instead of brains, Gemini 3.1 Flash Lite is the counterweight.

CategoryRunware/Text/google

Inputs (16)

NameTypeDefaultDescription
messagesRUNWARE_MESSAGES
imagesoptIMAGE
seedoptINT00–4294967295Random 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.maxTokensoptINT40961–128000Maximum number of tokens to generate in the response.
settings.systemPromptoptSTRINGSystem-level instruction that guides the model's behavior and output style across the entire generation.
settings.temperatureoptFLOAT1.000–2Controls randomness in generation. Lower values produce more deterministic outputs, higher values increase variation and creativity.
settings.thinkingLeveloptCOMBOhighControls 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.topPoptBOOLEANfalseEnable to set settings.topP. Off uses the model's default.
settings.topP_valueoptFLOAT0.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: inputs.audios, inputs.documents, inputs.videos, settings.stopSequences, tools

Outputs (1)

NameTypeDescription
textSTRING