Qwen
The no-frills text LLM node hiding inside the VL pack
- STRING
Qwen is the text-only node from alexcong's ComfyUI_QwenVL pack, and before you ask: yes, it's the same node as Qwen2.5. The pack registers the same text class under both names, so any workflow that says one or the other runs identically. This page is the original name.
If the vision node in this pack is the flashy one, this is the workhorse. No image, no video, no vision weights - just a chat LLM (Qwen2.5-Instruct and Qwen3-4B checkpoints) that takes a system prompt and a user prompt and returns a STRING. The most common use in a generation graph is prompt expansion: you give it "a rainy neon alley at night," it hands back a structured paragraph, and you wire that into CLIPTextEncode. It's the smallest possible implementation of the "let an LLM write the prompt" workflow that's become standard for modern text-encoder models.
How it works
It's a thin wrapper around Hugging Face's AutoModelForCausalLM + AutoTokenizer. Your system and prompt are joined into a chat template, tokenized, generated from with max_new_tokens and a temperature, and decoded. First run downloads the checkpoint into ComfyUI/models/LLM/ automatically - no manual model hunting. It runs bfloat16 on Ampere+ GPUs, fp16 otherwise, and supports none/4bit/8bit quantization via bitsandbytes.
Six models in the dropdown: Qwen2.5-3B/7B/14B/32B-Instruct, plus Qwen3-4B-Thinking-2507 and Qwen3-4B-Instruct-2507 (the default). For prompt-writing duty, anything above 7B is honestly overkill.
Inputs and output
- system - your instruction/persona. The default "You are a helpful assistant." works, but people get the most out of this node by replacing it with a prompt-engineering system prompt.
- prompt - the thing you want expanded or rewritten.
- model - the six-way dropdown.
- quantization -
none/4bit/8bit. Reach for 4bit if you're running the 14B or 32B. - keep_model_loaded - defaults to
False(unloads after each run). Flip toTruefor batch prompt generation. - temperature (0–1), max_new_tokens (128–2048), seed (
-1= random).
That's it - there are no optional inputs on this node. The output is a single STRING, ready for CLIPTextEncode or a ShowText node.
Install
Via ComfyUI Manager (search "Qwen-VL wrapper for ComfyUI") or:
cd ComfyUI/custom_nodes
git clone https://github.com/alexcong/ComfyUI_QwenVL
cd ComfyUI_QwenVL
pip install -r requirements.txt
Restart ComfyUI. One install covers all four nodes in the pack; the requirements include transformers>=4.57.1, accelerate, bitsandbytes, and optimum.
Gotchas
The pack-level ones apply here too: keep_model_loaded defaults off (slow on repeated runs), quantization needs working bitsandbytes on CUDA, and the transformers>=4.57.1 pin can fight setups that need an older transformers. Two node-specific notes. If you leave both system and prompt empty, you get an Error: Both system and prompt are empty. string rather than a crash - easy to trip over when you first drag it in. And keep the temperature moderate: at 0.7, Qwen's default, prompt output can come out a little generic. Drop to 0.5 and give it a real system prompt before you decide the model is weak.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| system | STRING | You are a helpful assistant. | — |
| prompt | STRING | — | |
| model | COMBO | Qwen3-4B-Instruct-2507 | 6 options: Qwen2.5-3B-Instruct, Qwen2.5-7B-Instruct, Qwen2.5-14B-Instruct, Qwen2.5-32B-Instruct, Qwen3-4B-Thinking-2507, Qwen3-4B-Instruct-2507 |
| quantization | COMBO | none | 3 options: none, 4bit, 8bit |
| keep_model_loaded | BOOLEAN | false | — |
| temperature | FLOAT | 0.70–1 | — |
| max_new_tokens | INT | 512128–2048 | — |
| seed | INT | -1 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |