ThinkingLLM (GGUF)
Vision LLMs on the VRAM you actually have
- image
- video
- mask
- audio
- RESPONSE
- RAW_TRACE
The plain ThinkingLLM node runs Qwen-VL through Transformers in fp16, which costs a lot of VRAM. This one runs the same models through llama.cpp as GGUF quants, which is how you fit a vision LLM next to a diffusion model on a mid-range card. The default Qwen3-VL 4B Q4_K_M is about 2.4 GB instead of 7.5 GB, and on a card that's already hosting a checkpoint and a VAE, that difference is the whole ballgame.
If you've been around the GGUF world since the Flux era, none of this is exotic: quantized weights, a Q ladder, Q8 being basically fp16 at half the size. The pack just hands you a curated catalog (gguf_models.json) of Qwen3-VL, Qwen3.5, Qwen2.5-VL, and Gemma 4 GGUFs with pre-matched mmproj vision files, auto-downloads what's missing on first use, and auto-discovers local .gguf files you drop in models/LLM/GGUF/ - as long as the matching mmproj sits beside them.
How it works and what to set
Everything important mirrors the HF node: model_name (with [installed] / [local] markers in the list), preset_prompt / custom_prompt, max_tokens, keep_model_loaded, seed, stream_tokens_to_terminal, enable_thinking, auto_finalization_retry, hf_token, plus optional image, video, and audio inputs. Outputs are RESPONSE and RAW_TRACE.
The two you'll actually touch on day one:
model_name- pick the quant that fits. Q4_K_M is the accepted compromise; Q8 is nearly lossless if you have the room. Bigger quant = slower prompt processing but better answers, and llama.cpp quants beat Transformers fp16 on memory every time.enable_thinking- on by default. On Qwen GGUFs it works; on non-Qwen GGUF models the tooltip is blunt about it: advisory, may not be honored by the backend.
Installing - read this twice
Manager install (search ThinkingLLM) gets you the node, but the GGUF path needs a vision-capable llama-cpp-python, and the stock PyPI package usually doesn't ship the Qwen3VLChatHandler / Qwen25VLChatHandler the vision models need. On Linux, the node auto-checks at first GGUF use and tries to install a matching JamePeng backend wheel; on Windows you'll likely need to grab a matching win_amd64 wheel from JamePeng's releases yourself (match your ComfyUI Python version - cp310/cp311/cp312/cp313 - and build type), per docs/LLAMA_CPP_PYTHON_VISION_INSTALL.md in the repo.
cd ComfyUI/custom_nodes
git clone https://github.com/goodguy1963/ComfyUI-ThinkingLLM.git
cd ComfyUI-ThinkingLLM
pip install -r requirements.txt
You can probe your backend before blaming anything else:
python tools/check_llama_backend.py
Common issues
Where people get burned: installing the GGUF node, running it, and seeing vision silently fail because llama-cpp-python is the CPU-only PyPI build. If RAW_TRACE says GPU offload is no/unknown, verify the wheel before hunting in your workflow. This node also exposes optional audio inputs even though normal Qwen models can't hear - the read-only info box will warn you about that; audio really belongs to the dedicated Gemma 4 Audio node. And since this is a GGUF loader, treat the download step as part of the run: first use can stall while it fetches the model and mmproj.
Inputs (17)
| Name | Type | Default | Description |
|---|---|---|---|
| model_name | COMBO | Qwen3.5-4B-Uncensored-HauhauCS-Aggressive-Q4_K_M.gguf [~2.4GB] | GGUF vision model from gguf_models.json or auto-detected local files. [installed] means the catalog model was found in a configured GGUF/LLM location; [local] means an uncatalogued local model. Missing GGUF or mmproj files are downloaded on first use. |
| preset_prompt | COMBO | 🖼️ Detailed Description | 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–32768 | Maximum new tokens to generate. Larger values give more room for reasoning but increase runtime and memory use. |
| keep_model_loaded | BOOLEAN | false | Keep the GGUF model in RAM/VRAM after the run so repeated prompts skip model loading. Disable if you need memory back for other nodes. |
| seed | INT | 11–4294967295 | Sampling seed. The node also uses fixed-seed prompt persistence, so identical inputs can reuse the saved result. |
| stream_tokens_to_terminal | BOOLEAN | false | Print generated tokens live in the ComfyUI terminal. Useful for long runs and backend troubleshooting. |
| 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 GGUF models this is advisory and may not be honored by the backend. |
| auto_finalization_retry | BOOLEAN | false | If enabled, runs an extra LLM completion when the first output is empty or reasoning-only. Disabled by default so one node execution performs one generation pass. |
| hf_token | STRING | Optional Hugging Face access token for private or gated GGUF/mmproj 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 | — | |
| mask_modeopt | COMBO | focus | Focus describes the selected area; reconstruct conceals it and infers the surrounding scene continuation. |
| audioopt | AUDIO | — | |
| audio_file_pathopt | STRING | Optional local audio file path. M4A, MP3, WAV, FLAC, and other FFmpeg-readable files are decoded to 16 kHz mono WAV before inference. | |
| 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 | — |