Qwen Conversation 🐼
A Qwen3 chatbot that lives in your graph — and remembers what you said
- text
This is the node for when you want to converse with a language model from inside ComfyUI, not just fire one prompt at it. It loads a Qwen3 model locally, keeps the whole back-and-forth in memory, and hands you a running transcript. No API calls, no key, no cloud account - the name "Qwen" here is Alibaba's open-weights family, the same lab behind Qwen-Image and Wan, so you're getting a real reasoning LLM without the registration dance.
Where it fits: prompt-writing. The community's moved LLM-assisted prompting from a browser tab into a node (it's genuinely a thing now - dedicated per-family prompt node packs draw real attention), and the conversational node is the variant for iterating. Ask for a Flux prompt, then follow up with "make it punchier" or "now add golden hour and a wet street," and each turn builds on the last. It's also the obvious choice for any chat-style assistant workflow you want inside a graph.
How it works
Both nodes in the pack share one QwenTextProcessor that loads the model with a Hugging Face transformers pipeline and, for 4-bit/8-bit, a BitsAndBytesConfig quantization. The multi-turn node appends your prompt to a chat_history list, generates, then appends the assistant reply, so context survives across runs as long as the node instance does.
First run is the big one. If the model files aren't in ComfyUI/models/Qwen/Qwen/<model>, the node speed-tests Hugging Face and ModelScope, picks the faster source, and downloads with up to three retries. Qwen3-4B (the default) is roughly 8GB at full precision - at 4-bit it's more like 2.5GB, which is why the 4-bit option is the default.
"Thinking mode" is Qwen3's built-in reasoning. Enabled, you get the <think> chain (the node prettifies the tags); disabled, the thinking block is stripped and you only see the final answer. Sampling params change per mode too - cooler and narrower when thinking, warmer and looser when not.
The inputs that matter
Honestly, you set maybe three of these:
- model_name - 26 Qwen3 variants from 0.6B to the 235B MoE. Default
Qwen3-4Bis the sane starting point; smaller if you're short on VRAM, and the FP8/AWQ/GGUF entries are pre-quantized (the node ignores your quantization setting for those). - quantization - 4-bit (default), 8-bit, or None. Start at 4-bit; only climb to 8-bit if quality visibly matters and you have the VRAM.
- enable_thinking - on for complex reasoning, off for fast chat.
prompt is your next message; max_new_tokens caps each reply; clear_history wipes the transcript; unload_after_generation (on by default) frees VRAM after each run at the cost of a slow reload next time.
The output - where people get burned
The single output is text, but it's not the latest reply. It's the whole formatted transcript - [USER] and [ASSISTANT] blocks with dashes between turns. That's great for chat and logging, and awkward if you blindly wire it into a CLIP Text Encode. For feeding a text encoder, reach for the pack's other node, QwenSingleTurnGeneration, which returns just the clean assistant answer.
Install
Install once for both nodes - the pack ships together.
cd ComfyUI/custom_nodes
git clone https://github.com/SXQBW/ComfyUI-Qwen
cd ComfyUI-Qwen
pip install -r requirements.txt
Or search "ComfyUI-Qwen" in ComfyUI Manager and hit install. One wrinkle: the README still says ComfyUI-Qwen3.git in a few spots - the repo was renamed, the Manager entry and the URL above are current.
The dependencies are chunky: torch>=2.6, transformers>=4.51, accelerate, plus modelscope for the dual-source download. You'll probably have most of them. The gotcha: bitsandbytes is not in requirements.txt, but 4-bit/8-bit quantization needs it - if you get an error about bitsandbytes when loading, pip install bitsandbytes. On Apple Silicon or CPU it's fp16 by default anyway, and slow.
First load takes a while no matter what - it's downloading gigabytes and then loading an LLM into RAM. And since this runs real Python and pulls from Hugging Face, treat it like any custom node: glance at the repo before installing. The ecosystem's had at least one nasty LLM-node security incident, and nothing's changed about how installs work.
A word on the model folder: everything lands in models/Qwen/Qwen/<model>, a slightly odd nested path - but that's normal for this pack, so don't go hunting.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| model_name | COMBO | Qwen3-4B | 选择可用的模型版本。 | Select the available model version. |
| quantization | COMBO | 👍 4-bit (VRAM-friendly) | 选择量化级别: ✅ 4-bit: 显著减少显存使用。 ⚖️ 8-bit: 平衡精度和性能。 🚫 None: 使用原始精度(需要高端GPU)。 Select the quantization level: ✅ 4-bit: Significantly reduces VRAM usage. ⚖️ 8-bit: Balances precision and performance. 🚫 None: Uses original precision (requires high-end GPU). |
| enable_thinking | BOOLEAN | false | 启用或禁用思考模式。思考模式适用于复杂推理任务,非思考模式适用于高效对话。 | Enable or disable thinking mode. Thinking mode is suitable for complex reasoning tasks, while non-thinking mode is optimized for efficient conversations. |
| prompt | STRING | This is the prompt text used for generating images with Fulx: "In the style of GHIBSKY, a cyberpunk panda holding a neon sign that reads: 'Designed by SXQBW'". Please optimize, supplement and improve the prompt text according to its content, and make the generated image effect the best. | 输入提示文本 | Enter the prompt text |
| max_new_tokens | INT | 102464–2048 | 控制生成的最大token数 | Control the maximum number of tokens to generate |
| clear_history | BOOLEAN | false | 是否清除对话历史 | Whether to clear the conversation history |
| unload_after_generation | BOOLEAN | true | 生成后是否卸载模型以释放资源。启用此选项可减少内存占用,但会增加下次使用时的加载时间。 | Whether to unload the model after generation to free up resources. Enabling this option reduces memory usage but increases load time for subsequent uses. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |