DeepSeek-V4-Pro
An LLM Living Inside Your ComfyUI Graph
- messages
- text
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;maxspends 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. Theadvanced_jsonfield is the documented escape hatch forsettings.stopSequencesandtools.
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.
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| messages | RUNWARE_MESSAGES | — | |
| seedopt | INT | 00–9223372036854776000 | Random seed for reproducible generation. When not provided, a random seed is generated in the unsigned 32-bit range. |
| numberResultsopt | INT | 11–4 | Number of results to generate. Each result uses a different seed, producing variations of the same parameters. |
| includeUsageopt | BOOLEAN | false | Include token usage statistics in the response. |
| settings.frequencyPenaltyopt | FLOAT | 0.000–2 | Penalizes tokens based on their frequency in the output so far. A value of 0.0 disables the penalty. |
| settings.maxTokensopt | INT | 327681–100000 | Maximum number of tokens to generate in the response. |
| settings.presencePenaltyopt | FLOAT | 0.000–2 | Encourages the model to introduce new topics. A value of 0.0 disables the penalty. |
| settings.systemPromptopt | STRING | System-level instruction that guides the model's behavior and output style across the entire generation. | |
| settings.temperatureopt | FLOAT | 1.000–2 | Controls randomness in generation. Lower values produce more deterministic outputs, higher values increase variation and creativity. |
| settings.thinkingLevelopt | COMBO | off | Controls the depth of internal reasoning the model performs before generating a response. |
| toolChoiceopt | BOOLEAN | false | Enable to set toolChoice. Off uses the model's default. |
| toolChoice.nameopt | STRING | Name of the specific tool the model must call. Required when type is `tool`. | |
| toolChoice.typeopt | COMBO | (default) | Strategy the model uses to decide when and which tools to call. |
| settings.topPopt | FLOAT | 1.000–1 | Nucleus sampling parameter that controls diversity by limiting the probability mass. Lower values make outputs more focused, higher values increase diversity. |
| outputFormatopt | COMBO | TEXT | Output format for the generated text. |
| advanced_jsonopt | STRING | Optional JSON merged into the request. For: settings.stopSequences, tools |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |