API Qwen Text Gen_R
QwQ and DeepSeek-R1 reasoning, thinking output included
- text
- thinking
The _R suffix means reasoning. API Qwen Text Gen_R is the sibling of the pack's plain Qwen text node, and its whole trick is that it hands you the model's chain-of-thought as a separate output - the same appeal as the DeepSeek R1 node, but served through Alibaba's DashScope endpoint with QwQ and DeepSeek-R1 available under one key.
You'd reach for it when the answer genuinely needs a thinking pass: analyzing a complex image description to extract the details that matter, planning a multi-step prompt, or any job where you want to see why the model produced a particular prompt before you trust it. It's overkill for routine enhancement - llm-in-comfyui.md makes the point well: the prompt-enhancement job selects for small-and-obedient, not large-and-deliberating, and a reasoner is more likely to leak scratch-work into your prompt. But the thinking output changes the calculus: if you're using the reasoning rather than just paying for it, this node is genuinely useful.
How it works
Same DashScope OpenAI-compatible endpoint as the rest of the Qwen nodes, but with stream=True and a loop that splits the stream into reasoning_content (the thinking) and content (the answer). The model dropdown has three choices: qwq-plus, qwq-plus-latest, and deepseek-r1 (the default). All three go through DashScope, so one DASHSCOPE_API_KEY serves them. QwQ is Alibaba's open reasoning family; deepseek-r1 here is the hosted DeepSeek reasoner reached through the same key, no second account needed.
The inputs that matter
prompt(multiline) - your question or task. There's nosystem_prompton this node; the reasoning models are treated as pure user-message calls.model-qwq-plusis the workhorse,deepseek-r1is the default and arguably the strongest.api_key- env var (DASHSCOPE_API_KEY) or field. Blank field + missing env var =API Key is not set.seed- accepted, ignored by the API. Don't expect reproducibility.
The two outputs are text (the final answer) and thinking (the reasoning trace). Wire text onward into your pipeline; route thinking to a text viewer if you want to audit the logic.
Installing it
Comes with ComfyUI_Prompt-All-In-One (billwuhao). ComfyUI Manager → search Prompt-All-In-One, or:
cd ComfyUI/custom_nodes
git clone https://github.com/billwuhao/ComfyUI_Prompt-All-In-One.git
cd ComfyUI_Prompt-All-In-One
pip install -r requirements.txt
Restart, and it's under 🎤MW/MW-Prompt-All-In-One.
Where people get burned
The reasoning stream only appears if you pick an actual reasoning model - choose qwq-plus or deepseek-r1 and the thinking output fills; the node's streaming logic is built around those. Also note the answer and thinking arrive in two separate strings, not one combined blob; if you want them together, run them through a text-concatenate node. And keep the shared-pack reminder in mind: reasoning calls cost more tokens per request than a plain chat call, so your per-run meter is higher than the non-R node - that's the price of watching it think. For the one-key-to-rule-them-all story, this is the node to remember: DeepSeek-R1, QwQ and plain Qwen all behind a single DashScope key in one pack.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| api_key | STRING | — | |
| prompt | STRING | — | |
| model | COMBO | deepseek-r1 | 3 options: qwq-plus, qwq-plus-latest, deepseek-r1 |
| seed | INT | 00–18446744073709550000 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |
| thinking | STRING | — |