ComfyUI Node

MiniMax M2.7

Yes, this pack does text LLMs too

By Runware·Created 2 years ago·Updated about a month ago· 140
MiniMax M2.7
  • messages
  • text
seed0
numberResults1
includeUsagefalse
settings.maxTokens32768
settings.systemPrompt
settings.temperature1.00
toolChoicefalse
toolChoice.name
toolChoice.type(default)
settings.topP0.95
outputFormatTEXT
advanced_json

Easily the most surprising node in the Runware pack, because it isn't image or video at all: it's a hosted LLM. MiniMax M2.7 is a large language model, exposed as a chat node that takes a RUNWARE_MESSAGES conversation in and returns generated text. If you've been treating ComfyUI as purely a diffusion playground, this is the pack reminding you that a generation graph can host a text model just as easily as a diffusion model - and that the same cloud account and API key power all of it.

The practical pitch: you can now do prompt engineering inside the graph. Generate a prompt with an LLM node and feed the string into a positivePrompt socket. Write a negative prompt programmatically. Summarize a caption, batch-rewrite a dataset's descriptions, or drive a captioning loop - all without leaving ComfyUI and without installing a local model. For that job, a hosted M2.7 is wildly more convenient than running a 70B-class model on your own machine.

Inputs that matter

The required messages input takes a RUNWARE_MESSAGES value from the Runware Messages builder (also under Runware/Params), which has just two fields: role (system/user/assistant) and content (the text). Build your conversation there and wire it in.

  • settings.systemPrompt - system-level instruction that steers behavior for the whole generation. This is where you say "you are a prompt engineer who writes photorealistic Stable Diffusion prompts."
  • settings.temperature - randomness, 0–1, default 1. Lower for deterministic rewrites, higher for creative variety.
  • settings.topP - nucleus sampling, default 0.95. Leave it alone unless you know the difference.
  • settings.maxTokens - response ceiling, default 32768, up to 196608. The tooltip's range tells you M2.7 is a serious context-length model.
  • toolChoice / toolChoice.type - tool-calling strategy (auto, any, tool, none), with toolChoice.name when you pin one tool. The advanced_json field exists for the tools array itself - so yes, you can build a tool-using agent in a ComfyUI graph.
  • includeUsage - include token usage stats in the response. Turn it on if you're watching your budget, which you should be.

seed, numberResults (up to 4), and outputFormat (a one-choice TEXT dropdown) are the rest.

How it works

The node sends minimax:m2.7@0 as a textInference task through the Runware SDK. The text output is a plain STRING - which is the whole trick: a string wires anywhere. Straight into another node's prompt field, into a text consumer, or into the pack's own image nodes. Cost prints on the title bar.

Install and gotchas

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

Restart; API key via Settings → "Runware API key", RUNWARE_API_KEY, or runware auth login. Paid per token-generation run.

The trap is forgetting the messages builder exists and expecting a text box on the node itself. There isn't one - you must wire a Runware Messages node in, role and content per message. Second trap: a hosted LLM can burn through a top-up fast if you leave maxTokens at 32768 and forget includeUsage; for prompt-rewriting work, set a low max and watch the cost line.

CategoryRunware/Text/minimax

Inputs (13)

NameTypeDefaultDescription
messagesRUNWARE_MESSAGES
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.maxTokensoptINT327681–196608Maximum 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–1Controls randomness in generation. Lower values produce more deterministic outputs, higher values increase variation and creativity.
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.topPoptFLOAT0.950–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