Deepseek Reasoner
R1's chain of thought, delivered as two strings you can actually use
- reasoning
- answer
R1 is the model that made "chain of thought" a household word in early 2025, and this node is the pack's way of putting it in your graph. "Deepseek Reasoner" calls the deepseek-reasoner model on DeepSeek's API and - this is the good part - hands you both halves of the answer: the internal reasoning and the final reply, as two separate string outputs.
So yes, you get the reasoning the model did before answering, which is fun to watch and genuinely useful for debugging why a generated prompt came out the way it did.
How it works
Like the other nodes, it reads your key from config.json, calls api.deepseek.com, and returns strings. Two differences matter.
First, the outputs: reasoning is the model's chain-of-thought (reasoning_content in the API response), and answer is the actual reply. Wire the one you care about downstream - usually answer, though plenty of people pipe reasoning into a text display just to watch.
Second, this node remembers. Unlike the plain chat nodes, it keeps the conversation in memory on the node instance and sends the whole thing back on every run. Toggle the clear_history input to true (or restart ComfyUI) to start fresh.
The inputs that matter
prompt(multiline) - required, your question.clear_history(boolean, default false) - required, and it's the one to watch. Flip it to true when you want the conversation wiped.temperature(default 0.7),max_tokens(default 2048, cap 4096),top_p,frequency_penalty,presence_penalty- the usual dials, same meanings as the Advanced node.
Outputs: reasoning and answer, both STRING.
One quirk worth knowing: this node has no system_prompt input - just prompt and clear_history plus the dials. If you want to steer the model with a system prompt, the pack's Silicon Reasoner node includes one.
Install and gotchas
Same pack, same install: search "Comfyui-Deepseek" in ComfyUI Manager, or clone https://github.com/yichengup/Comfyui-Deepseek into ComfyUI/custom_nodes and restart. No models to download - it's all API.
Key goes in custom_nodes/Comfyui-Deepseek/config.json as api_key, from platform.deepseek.com. Edit, then restart ComfyUI so the node re-reads the file.
Troubleshooting, grounded in how the code actually behaves:
- History runs away with your tokens. The in-memory history accumulates every assistant answer, so a long session makes each call bigger and slower. If output starts feeling laggy, set
clear_historyto true. - Answers feel truncated. R1 reasons a lot, and
max_tokenscaps the whole response including the reasoning. Raise it toward 4096 if you're losing the ending. Error:in an output - key missing, wrong key, or empty balance coming back as text instead of a crash. Checkconfig.json.- History is per-node-instance. It lives in the node in your current session, not in the workflow file. Reload the workflow and the memory is gone - which is also your easiest reset.
The honest pitch: the other nodes in this pack are simple postcards. This one is the reason the pack exists for most people - R1's reasoning, cheaply, inside a workflow.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | — | |
| clear_history | BOOLEAN | false | 清除历史对话记录 |
| temperatureopt | FLOAT | 0.70–2 | 创造性(越大越有创意,越小越严谨) |
| max_tokensopt | INT | 20481–4096 | 最大输出长度 |
| top_popt | FLOAT | 1.00–1 | 采样范围(影响回答的多样性) |
| frequency_penaltyopt | FLOAT | 0.0-2–2 | 用词重复度(越大越不爱重复用词) |
| presence_penaltyopt | FLOAT | 0.0-2–2 | 话题重复度(越大越容易换新话题) |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| reasoning | STRING | — |
| answer | STRING | — |