Qwen 3.5 VL
Put Qwen 3.5 VL inside ComfyUI without nuking your transformers install
- image_or_video
- text
- raw_text
Qwen 3.5 is Alibaba's newest open vision-language line, and it's good at the thing you want a VLM for in ComfyUI: look at an image or a clip of frames and tell you what's happening, in your own words. This node is the simplest way to run it locally - pick a size from 0.8B to 9B, wire in an image, and a text string pops out the other end. No API, no key, no cloud. It's the captioner you'll reach for before LoRA training, or the thing that turns a rendered frame into a descriptive prompt for the next pass.
The big deal, and the reason this pack exists: Qwen 3.5 needs transformers 5.x, and most of the ComfyUI node ecosystem is stuck on 4.x. Install the model the naive way and you'll silently break half your other nodes the next time you restart. That's a real, well-worn community pain - by early 2026 people were hand-patching QwenVL forks just to get 3.5 support. This pack sidesteps the war entirely.
How it works
On startup, the pack pip installs transformers==5.2.0 and huggingface_hub into a local vendor/ folder inside the custom node - not your global environment. Every time the node runs, a context manager temporarily swaps those modules out of sys.modules and back. So the 5.x world never touches the 4.x world your other nodes rely on. It's the right pattern, even if a node re-installing its own dependencies on import sounds like something to side-eye (more below).
From there it's a standard HF pipeline: the model auto-downloads from Hugging Face to ComfyUI/models/qwen35 on first execution, your image (or sampled video frames) gets packed into the chat template, and generation streams through a token iterator. The default use_4bit loads with BitsAndBytes quantization, which is how a 9B model fits on a consumer card.
Inputs and outputs that matter
image_or_video(optional) - wire in any IMAGE output. One frame gets treated as an image; a batch of frames is handled as video, withframe_countdeciding how many are sampled. Leave it empty for pure text.model_size- 0.8B / 2B / 4B / 9B. 4B is the default and the sweet spot; 0.8B and 2B are fast but noticeably dimmer.promptandsystem_prompt- the question and the persona. The default prompt ("Describe in detail what is happening in this image/video") is fine, but this is where you steer output into caption-style territory.enable_thinking- Qwen's chain-of-thought. Off by default (it appends "Do not use<think>tags" to the system prompt instead). Leave it off unless you're debugging why an answer is wrong.use_4bit/attention_mode- quantize or not, and which attention backend.sdpais the safe default;flash_attention_2is faster only if you've already got flash-attn built.use_torch_compile- off by default. First run compiles and takes a while, and if it fails the node swallows the error and logs it. Skip it.
Everything else - temperature, top_p, max_new_tokens, seed, repetition_penalty, num_beams - is standard generation dial. Note keep_model_loaded (on by default): it stops the node from unloading and re-downloading the model on every run.
Two outputs, and they're easy to mix up: text is the cleaned answer - anything after </think> is stripped and whitespace trimmed. raw_text is the full generation including any thinking tokens. Wire text into your caption-save or prompt-feed step; keep raw_text only if you want to inspect the reasoning.
Installing it
Easiest: ComfyUI Manager, search "ComfyUI-Qwen3.5-VL", install. Or the manual way:
cd ComfyUI/custom_nodes
git clone https://github.com/bananasss00/ComfyUI-Qwen3.5-VL.git
Then restart ComfyUI. First startup is slow (the vendored dep install - that's normal), and the model pulls down to ComfyUI/models/qwen35 on first execution. It downloads the full fp16 weights even if you run 4-bit, so the 9B is a long wait.
Where people get burned
- Don't "help" by updating global transformers to 5.2. That's the exact conflict the vendoring exists to avoid; you'll break other packs.
- The vendored install uses
--no-deps, sotokenizersmay be missing invendor/. If the node errors on import, run the README's fallback:pip install transformers==5.2.0 huggingface_hub tokenizers --target vendorinside the pack folder. flash_attention_2needs flash-attn compiled for your GPU. No flash-attn, no dice - stick withsdpa.use_4bitneeds bitsandbytes, which is fussy on AMD and Apple silicon. If 4-bit fails on load, flipuse_4bitoff.- And the honest caution: any custom node runs arbitrary Python on import, and vision-LLM nodes that auto-install things are a favorite malware vector (see the ComfyUI_LLMVISION incident). This one installs into an isolated folder rather than your global env, which is the good-faith version of the pattern - but a quick skim of
nodes.pybefore you trust it with your prompts costs two minutes.
Inputs (18)
| Name | Type | Default | Description |
|---|---|---|---|
| model_size | COMBO | 4B | 4 options: 0.8B, 2B, 4B, 9B |
| system_prompt | STRING | You are a helpful assistant. | — |
| prompt | STRING | Describe in detail what is happening in this image/video. | — |
| use_torch_compile | BOOLEAN | false | — |
| enable_thinking | BOOLEAN | false | — |
| use_4bit | BOOLEAN | true | — |
| attention_mode | COMBO | sdpa | 3 options: sdpa, flash_attention_2, eager |
| max_context_tokens | INT | 8192512–128000 | — |
| max_image_pixels | INT | 100352010000–12800000 | — |
| max_new_tokens | INT | 102464–8192 | — |
| temperature | FLOAT | 0.60–2 | — |
| top_p | FLOAT | 0.900–1 | — |
| num_beams | INT | 11–8 | — |
| repetition_penalty | FLOAT | 1.100.5–2 | — |
| seed | INT | 11–4294967295 | — |
| frame_count | INT | 161–64 | — |
| keep_model_loaded | BOOLEAN | true | — |
| image_or_videoopt | IMAGE | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |
| raw_text | STRING | — |