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

ThinkingLLM Advanced (GGUF)

A ComfyUI node in ThinkingLLM with 33 inputs and 2 outputs.

By goodguy1963·Created 3 months ago·Updated 25 days ago· 13
ThinkingLLM Advanced (GGUF)
  • image
  • video
  • audio
  • RESPONSE
  • RAW_TRACE
model_nameQwen3-VL-4B-Instruct-c_abliterated-v2.Q4_K_M.gguf [~2.4GB]
deviceauto
preset_prompt🖼️ Detailed Description
custom_prompt
max_tokens8192
temperature0.60
top_p0.90
repetition_penalty1.00
frame_count16
ctx32768
n_batch512
gpu_layers-1
image_max_tokens4096
top_k20
pool_size4194304
keep_model_loadedfalse
seed1
legacy_seed_modefixed
legacy_unload_after_runfalse
n_ubatch512
n_threads0
n_threads_batch0
flash_attntrue
offload_kqvtrue
ctx_checkpoints0
stream_tokens_to_terminalfalse
enable_thinkingtrue
auto_finalization_retryfalse
hf_token
audio_file_path
CategoryThinkingLLM

Inputs (33)

NameTypeDefaultDescription
model_nameCOMBOQwen3-VL-4B-Instruct-c_abliterated-v2.Q4_K_M.gguf [~2.4GB]GGUF vision model from gguf_models.json or auto-detected local files. [installed] means the catalog model file was found on disk; [local] means an uncatalogued local model. Missing GGUF or mmproj files are downloaded on first use.
deviceCOMBOautoauto prefers CUDA when PyTorch sees an NVIDIA GPU. If RAW_TRACE says GPU offload is no or unknown, verify your llama-cpp-python CUDA wheel before blaming the model.
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.
temperatureFLOAT0.600–2Sampling randomness. Lower values are more deterministic; higher values are more varied.
top_pFLOAT0.900–1Nucleus sampling cutoff. Lower values restrict token choice; 0.9 is a balanced default.
repetition_penaltyFLOAT1.000.5–2Values above 1.0 reduce repeated phrases; 1.0 leaves repetition unmodified.
frame_countINT161–64Number of video frames to sample. More frames improve video context but raise image-token, batch, and context pressure.
ctxINT327681024–262144llama.cpp context window. Too large can reduce speed and increase KV-cache memory even on strong GPUs.
n_batchINT51264–32768Prompt processing batch size. Higher can improve prompt ingestion but may raise memory use or fail with image/video inputs.
gpu_layersINT-1-1–200Number of model layers to offload to GPU. -1 asks llama.cpp to offload all possible layers; 0 is CPU-only.
image_max_tokensINT4096256–1024000Upper token budget for each image/video frame. Lower it if multimodal decode fails or VRAM use is too high.
top_kINT200–32768llama.cpp sampler top-k. 0 disables top-k filtering; 20 is a conservative default.
pool_sizeINT41943041048576–10485760llama.cpp memory pool size for multimodal work. Increase only when backend errors point at pool/context capacity.
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.
legacy_seed_modeCOMBOfixedLegacy workflow compatibility only. This widget is ignored by current ThinkingLLM logic.
legacy_unload_after_runBOOLEANfalseLegacy workflow compatibility only. Model unloading is controlled by keep_model_loaded.
n_ubatchINT5120–32768Physical batch size. Keep at or below n_batch. Lower values can improve stability; 0 uses min(n_batch, 512).
n_threadsINT00–256CPU generation threads. On high-core/NUMA servers, auto can be slower; try 8-16 if GPU utilization is low.
n_threads_batchINT00–256CPU prompt/batch threads. Tune separately from generation threads on server CPUs.
flash_attnBOOLEANtrueEnable llama.cpp flash attention when the installed backend accepts and supports it. RAW_TRACE reports if the kwarg was dropped.
offload_kqvBOOLEANtrueKeep K/Q/V and KV-cache related work on GPU when supported. RAW_TRACE warns when the backend drops this kwarg.
ctx_checkpointsINT00–32Checkpoint count for multimodal context handling. JamePeng builds usually recommend 0 for single-turn ComfyUI runs.
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.
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
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.

Outputs (2)

NameTypeDescription
RESPONSESTRING
RAW_TRACESTRING