Nodes/ComfyUI-ThinkingLLM/ThinkingLLM (GGUF)
ComfyUI Node

ThinkingLLM (GGUF)

Vision LLMs on the VRAM you actually have

By goodguy1963·Created 4 months ago·Updated 6 days ago· 21
ThinkingLLM (GGUF)
  • image
  • video
  • mask
  • audio
  • RESPONSE
  • RAW_TRACE
model_nameQwen3.5-4B-Uncensored-HauhauCS-Aggressive-Q4_K_M.gguf [~2.4GB]
preset_prompt🖼️ Detailed Description
custom_prompt
max_tokens8192
keep_model_loadedfalse
seed1
stream_tokens_to_terminalfalse
enable_thinkingtrue
auto_finalization_retryfalse
hf_token
mask_modefocus
audio_file_path
duration_seconds5.0

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.

CategoryThinkingLLM

Inputs (17)

NameTypeDefaultDescription
model_nameCOMBOQwen3.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_promptCOMBO🖼️ Detailed DescriptionSelect 'No preset' to use only the custom prompt or image input.
custom_promptSTRINGAdditional user input that gets combined with the preset template. Leave empty to use only the template.
max_tokensINT819264–32768Maximum new tokens to generate. Larger values give more room for reasoning but increase runtime and memory use.
keep_model_loadedBOOLEANfalseKeep the GGUF model in RAM/VRAM after the run so repeated prompts skip model loading. Disable if you need memory back for other nodes.
seedINT11–4294967295Sampling seed. The node also uses fixed-seed prompt persistence, so identical inputs can reuse the saved result.
stream_tokens_to_terminalBOOLEANfalsePrint generated tokens live in the ComfyUI terminal. Useful for long runs and backend troubleshooting.
enable_thinkingBOOLEANtrueEnable 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_retryBOOLEANfalseIf 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_tokenSTRINGOptional 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.
imageoptIMAGE
videooptIMAGE
maskoptMASK
mask_modeoptCOMBOfocusFocus describes the selected area; reconstruct conceals it and infers the surrounding scene continuation.
audiooptAUDIO
audio_file_pathoptSTRINGOptional local audio file path. M4A, MP3, WAV, FLAC, and other FFmpeg-readable files are decoded to 16 kHz mono WAV before inference.
duration_secondsoptFLOAT5.00.2–150Target 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)

NameTypeDescription
RESPONSESTRING
RAW_TRACESTRING