ThinkingLLM
Your node isn't frozen — it's thinking
- image
- video
- mask
- RESPONSE
- RAW_TRACE
ThinkingLLM started with a three-hour debugging session that wasn't a bug at all. The author watched a Qwen node sit there, progress bar dead, output empty, and assumed it had crashed. It hadn't - Qwen had silently entered its internal reasoning mode. This node is the answer to that: a local Qwen-VL / Gemma 4 interface with a thinking toggle, live token streaming, and a raw trace output so you can finally tell "the AI is thinking" from "the AI is stuck."
It's the flagship of the ComfyUI-ThinkingLLM pack, which wraps Qwen3.5, Qwen3-VL, Qwen2.5-VL, and Gemma 4 behind a cleaner node interface than the previous Qwen-VL nodes. It runs fully locally through Hugging Face Transformers - no API, no key - and it's a GPL-3.0 fork of Deaquay's Qwen3.5-Uncensored, itself a descendant of the 1038lab QwenVL lineage.
How it works
Pick a model and the node loads it into memory (first run downloads the weights into ComfyUI/models/LLM/Qwen-VL - the 4B VL models run about 7.5 GB download, so leave disk space). Feed it an optional image and/or video, give it a preset_prompt or your own custom_prompt, and it returns a cleaned RESPONSE string plus RAW_TRACE, the full generation stream including any thinking blocks.
The party trick is enable_thinking. On, and the model may reason before answering - and for easy prompts it may skip reasoning entirely, which is expected, not a bug. Off, and it sends a /no_think-style directive to force a direct answer. The toggle works best on Qwen3/Qwen3.5-style models; other architectures treat it as advisory.
The inputs that matter
model_name- pick from the catalog (Qwen3.5, Qwen3-VL Instruct/abliterated/unredacted, Gemma 4). Tooltips show download size and VRAM per model.preset_prompt/custom_prompt- presets cover "Detailed Description" plus LTX/Wan video-scene templates;custom_promptis combined with the preset.enable_thinking- the headline toggle.stream_tokens_to_terminal- print tokens live; this is the debugger for "stuck" prompts.keep_model_loaded- keep it resident between runs to skip reloads; turn off when you need the VRAM back.
Also worth knowing: prompts are cached. Identical inputs reuse the saved result, and seed = 1 is "fixed seed mode," which ignores image/video changes entirely - so if you swap the image and get the same old answer, that's the cache, not a hallucination. That trips up more people than anything else in this pack.
Installing
ComfyUI Manager → Install via Registry → search ThinkingLLM. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/goodguy1963/ComfyUI-ThinkingLLM.git
cd ComfyUI-ThinkingLLM
pip install -r requirements.txt
Then restart ComfyUI. The HF path needs transformers>=5.2.0 and pulls in sentencepiece and tiktoken for Gemma/Qwen tokenizers; the pack tries to auto-install a missing tokenizer backend at first load.
Common issues
First run is slow because it's downloading multi-gigabyte weights - check the terminal. Big images blow up the context window, so resize or scale before the node (the README says so explicitly). And when the node sits at zero output, resist the urge to force-quit: turn on token streaming first. That's the whole reason this pack exists.
One word of caution that applies to every node in this family: LLM-vision custom nodes execute arbitrary Python on import, and the community has a scar from the 2024 ComfyUI_LLMVISION malware incident. Install via the Manager registry, and treat any LLM node with a sketchy provenance carefully. This pack's open fork lineage is a decent signal, but you're still running a local model loader - worth knowing what that means.
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| model_name | COMBO | Qwen3-VL-4B-Instruct-Abliterated [DL: 7.5GB, VRAM: 6.0GB] | Pick the checkpoint. [installed] means a catalog model is available in a configured LLM location; [local] means an uncatalogued local model, including compatible ComfyUI text_encoders. Missing catalog models download on first use. |
| attention_mode | COMBO | auto | auto tries SageAttention → FlashAttention 2 → SDPA in order. SDPA is stable and recommended. Only override when debugging attention backends. |
| preset_prompt | COMBO | 🖼️ Detailed Description | Built-in instruction describing how Qwen-VL should analyze the media input. Select 'No preset' to use only the custom prompt or image input. |
| custom_prompt | STRING | Additional user input that gets combined with the preset template. Leave empty to use only the template. | |
| max_tokens | INT | 819264–8192 | Maximum number of new tokens to decode. Larger values yield longer answers but consume more time and memory. |
| keep_model_loaded | BOOLEAN | false | Keeps the model resident in VRAM/RAM after the run so the next prompt skips loading. |
| seed | INT | 11–4294967295 | Seed controlling sampling and frame picking; reuse it to reproduce results. 💡 Cache Info: Prompts are cached automatically. Use the same inputs (model, preset, custom prompt, image/video) to reuse cached prompts and avoid regeneration. 🔒 Fixed Seed Mode: Set seed = 1 to ignore image/video changes and only use text-based caching. Perfect for keeping the same prompt regardless of media input variations. |
| keep_last_prompt | BOOLEAN | false | Keep the last generated prompt instead of creating a new one |
| stream_tokens_to_terminal | BOOLEAN | false | Print every generated token live to the ComfyUI terminal/console |
| enable_thinking | BOOLEAN | true | Enable model reasoning/thinking when the backend supports it: True=allow thinking, False=force direct answer. Even when enabled, easy prompts may still get a direct answer, and this node automatically disables thinking when there is not enough output budget left for useful reasoning. For non-Qwen models (Gemma, LLaMA) this is advisory. |
| hf_token | STRING | Optional Hugging Face access token for private or gated model downloads. It is passed only to the download call, never logged or cached, and the in-memory copy is dropped after the download attempt. Clear this field before saving or sharing workflows. | |
| imageopt | IMAGE | — | |
| videoopt | IMAGE | — | |
| maskopt | MASK | — | |
| duration_secondsopt | FLOAT | 5.00.2–150 | Target video duration in seconds. It is used only by registered LTX 2.3 and MiniMax H3 video presets. Connect the same requested duration to the video generator; MiniMax values are normalized to its 17k+5 frame grid at 24 fps. For longer MiniMax scripts, ThinkingLLM selects a coherent moment that fits while keeping any selected dialogue verbatim. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| RESPONSE | STRING | — |
| RAW_TRACE | STRING | — |