ComfyUI Node

DeepSeek-V4-Pro

An LLM Living Inside Your ComfyUI Graph

By Runware·Created 2 years ago·Updated about a month ago· 140
DeepSeek-V4-Pro
  • messages
  • text
seed0
numberResults1
includeUsagefalse
settings.frequencyPenalty0.00
settings.maxTokens32768
settings.presencePenalty0.00
settings.systemPrompt
settings.temperature1.00
settings.thinkingLeveloff
toolChoicefalse
toolChoice.name
toolChoice.type(default)
settings.topP1.00
outputFormatTEXT
advanced_json

This is the node that makes people do a double-take: a DeepSeek LLM, running inside ComfyUI, spitting out a plain STRING instead of an image. DeepSeek-V4-Pro is a text-in, text-out node in a pack otherwise full of image and video generators - and it's quietly one of the most useful things in the pack, because it turns your graph into a place where prompts can be written by a model, not just typed by you.

The natural job for it is prompt engineering as a pipeline step: feed it a rough idea, let it expand that into the detailed positive prompt you feed your image node, and chain the two together. You get the LLM's prose skills and your diffusion model's output in one queue, no copy-pasting between tabs. If you've ever wanted to wire a "prompt improver" into your workflow, this is the direct version.

The inputs that matter

The required input is messages - a RUNWARE_MESSAGES socket that comes from the pack's message builder node under Runware/Params, where you construct the conversation turns (system, user, assistant). You're not typing a single prompt box; you're building a message list.

Then the LLM knobs, all familiar if you've used any chat API:

  • settings.systemPrompt - the system-level instruction that shapes the whole response. This is where you'd write "You are a prompt engineer for FLUX. Expand user requests into detailed English prompts."
  • settings.temperature and settings.topP - randomness. Lower temperature for consistent, repeatable prompt output; higher for variety.
  • settings.thinkingLevel - off / high / max. This is the DeepSeek reasoning toggle; max spends real tokens thinking, so only reach for it when the task genuinely needs reasoning.
  • settings.maxTokens - response length cap (default 32768, up to 100000).
  • settings.frequencyPenalty / settings.presencePenalty - token-level dials for repetition and topic drift.
  • includeUsage - returns token usage stats in the response.
  • toolChoice and its .type/.name - tool-calling control, gated behind a toggle. The advanced_json field is the documented escape hatch for settings.stopSequences and tools.

Output is one text (STRING) - wire it into any node that accepts a string, or into a text display to eyeball it.

The obvious thing to build

A self-improving prompt chain: DeepSeek-V4-Pro takes a one-line idea, expands it into a rich prompt, and that string feeds your Runware image node's positivePrompt. It's the cheapest way to get consistent, well-structured prompts across a batch - and unlike a local LLM node, this one costs you nothing in VRAM since it's another cloud call.

Install

Same pack, same drill:

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

Restart, set your Runware API key (Settings → Runware API key or RUNWARE_API_KEY). One caveat shared by every node here: each call bills your account - the title bar shows cost per run, and thinking-heavy DeepSeek calls with large maxTokens are where a session can quietly spend. It's still far cheaper than the human-hour it saves when it writes a good prompt on the first try.

CategoryRunware/Text/deepseek

Inputs (16)

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.frequencyPenaltyoptFLOAT0.000–2Penalizes tokens based on their frequency in the output so far. A value of 0.0 disables the penalty.
settings.maxTokensoptINT327681–100000Maximum number of tokens to generate in the response.
settings.presencePenaltyoptFLOAT0.000–2Encourages the model to introduce new topics. A value of 0.0 disables the penalty.
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.thinkingLeveloptCOMBOoffControls 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: settings.stopSequences, tools

Outputs (1)

NameTypeDescription
textSTRING