ComfyUI Node

DeepSeek-V4-Flash

An LLM inside your ComfyUI graph

By Runware·Created 2 years ago·Updated about a month ago· 140
DeepSeek-V4-Flash
  • 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

Every node in this pack runs in the cloud, but most of them feel like they're doing image or video stuff - this one is just a chat model wearing a ComfyUI costume. Runware_deepseek_v4_flash is DeepSeek's v4@flash model as a text node: wire in a message list, get a STRING back. No local VRAM, no Ollama, no GGUF download, no llama.cpp compile. It's the fastest way to get a real LLM thinking inside a workflow without installing half of a machine-learning stack.

Why would you want that in a node graph? Because LLMs are how modern workflows get smart. A text node upstream can rewrite your image prompt, caption a reference image into a prompt, expand a thumbnail concept into a detailed scene description, or decide what to generate next. Wire this node's text output into the positivePrompt of an image node and you've got a prompt-refinement pipeline with zero Python. It's the same trick the "AI prompt enhancer" tools sell, except you built it in five nodes.

How it works

The node speaks the Runware textInference task type with the deepseek:v4@flash AIR. You feed it a messages list (a RUNWARE_MESSAGES socket - the pack's builder lets you compose user/assistant turns), and the model's text comes back as a plain STRING that plugs into anything. The settings.* group mirrors the OpenAI-style sampling knobs you know: temperature, topP, frequencyPenalty, presencePenalty, maxTokens (default 32768), and a systemPrompt for setting the tone.

The inputs that matter

  • messages (required) - the conversation. This is the RUNWARE_MESSAGES socket; chain the pack's message-builder nodes to build a multi-turn chat.
  • settings.systemPrompt - the highest-leverage field on the node. "You are a prompt engineer. Rewrite the user's idea into a detailed Stable Diffusion prompt" turns this node into a dedicated prompt-crafting tool.
  • settings.thinkingLevel - off / high / max. DeepSeek is a reasoning-family model; max spends tokens thinking before answering. Turn it on when you want the model to actually work a problem, off when you want speed.
  • outputFormat - TEXT or JSON. JSON mode is gold if the output feeds a later node that needs structured data.
  • toolChoice - the tool-calling trio (auto / any / tool / none) for workflows where the model picks a function.

Installing it

Same as every node here - install the pack, not the model. 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

Key from runware.ai/api-keys, pasted into ComfyUI Settings → Runware API key or set as RUNWARE_API_KEY. No model files - DeepSeek runs on Runware's side.

Where people get burned

  • This is a metered LLM, not a local one. Every call costs tokens and every call shows a price on the title bar. A thinkingLevel: max request with a long system prompt is a bigger bill than a quick rewrite. Use it where it earns its keep, not on every keystroke.
  • The messages socket is a socket. You can't type the conversation into a text widget; you build it with the pack's message builder. Skip that and the required input sits empty.
  • Don't confuse model and task. This node is hard-wired to deepseek:v4@flash. The generic Runware (custom) node in the same pack is where you'd go for "any model, any task type."
  • Latency plus thinking is slow. A max-thinking response takes real seconds - the graph isn't stuck, it's reasoning.

DeepSeek-V4-Flash is the cheapest way to put a serious LLM in your graph. If you've never wired text into a prompt, this node is the gentlest introduction.

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–1048576Maximum 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, jsonSchema, tools

Outputs (1)

NameTypeDescription
textSTRING