Qwen-VL Model Config
The LLM Model Config node
- config
The main Qwen node takes its entire model configuration as a wall of JSON in config_override. That works, but it's hostile to beginners - one stray comma, one typo in mmproj_path, and you're debugging text you can't see. LLM Model Config is the pack's attempt to give you the same settings as real widgets instead. It's the "model half" of a two-node configurator (the sampling half is LLM Sampling Config).
The mechanism is refreshingly simple: this node has no inputs of consequence except one optional config_override for stacking extra fields, and it outputs a single config string. You wire that string into the main Qwen node's config_override input, exactly as if you'd typed the JSON yourself - because that's literally what it produces. Later values win when you stack, so you can chain a model config node plus a sampling config node plus a raw override and the pieces merge in order.
The inputs that matter
model_path- path to your GGUF model file, relative to the custom_nodes dir (or absolute).mmproj_path- path to the multimodal projector file. Required for vision. This is the single most-forgotten field in the whole pack; leave it empty and the model has no idea how to look at images.n_ctx- context size. The tooltip gives the rule:image_tokens + input_tokens + output_tokens <= n_ctx. Bump it for multi-image or video work; every token costs VRAM.n_gpu_layers- layers offloaded to GPU.-1= all. If you're OOMing or crawling, walk it down (40 β 35 β 30); the README notes this can even speed things up by avoiding VRAM overflow.n_batch/n_ubatch- prompt-processing batch and micro-batch. Lower saves VRAM,n_batch = n_ctxcan speed up processing.n_cpu_moe- for MoE models that don't fit in VRAM: moves that many expert layers to RAM/CPU. Roughly twice as fast as the oldn_gpu_layerspartial offload for big routers.chat_handler- the chat template for multimodal models:qwen3,qwen35,gemma4,llava16,minicpmv45and more. Get this wrong and you get garbage templates and garbled prompts.chat_format- for text-only models (llama-3, qwen, chatmlβ¦).enable_thinking- turns on reasoning for Qwen3.5/Gemma4. Costs output tokens; budget for it.use_mmap/use_mlock/offload_kqv- memory behavior. The README's observation: on Windows,use_mmapoff is often better;offload_kqvoff is the "safe VRAM" fallback.type_k/type_v- KV-cache quantization level. F16 default; lower types shrink the cache at some quality cost.verbose/debug- logging toggles;debugprints per-stage timing to the console, useful when you're diagnosing slow runs.
Install
It's part of KLL535/ComfyUI_Simple_Qwen3-VL-gguf, so it arrives with the main node:
cd ComfyUI/custom_nodes
git clone https://github.com/KLL535/ComfyUI_Simple_Qwen3-VL-gguf
or ComfyUI Manager (search ComfyUI_Simple_Qwen3-VL-gguf), restart, F5.
Honest take: if you're already comfortable writing config_override JSON, this node is a slightly slower way to do the same thing - the widgets don't cover every llama.cpp parameter, and config_override on the main node still accepts the full dictionary. But if JSON is where your confidence dies, or you're teaching someone, the sliders and dropdowns make the difference between "I'll try it" and "nope, closing ComfyUI." Worth having on the canvas for exactly that.
Inputs (20)
| Name | Type | Default | Description |
|---|---|---|---|
| model_path | STRING | Path to GGUF model file (relative to custom_nodes dir) | |
| mmproj_path | STRING | Path to multimodal projector (required for vision) | |
| n_ctx | INT | 8192512β1048576 | Context size: image_tokens + input_tokens + output_tokens <= n_ctx |
| n_batch | INT | 204832β8192 | Prompt processing batch. Lower = less VRAM, higher = faster. |
| n_ubatch | INT | 51232β8192 | Micro-batch size for advanced memory management |
| n_gpu_layers | INT | -1-1β256 | Layers to GPU: -1=all, 0=CPU only. Reduce if OOM. |
| n_cpu_moe | INT | 00β128 | MoE experts on CPU (VRAM saver). 0 = all on GPU. |
| n_threads | INT | 81β64 | CPU threads for inference. Match physical cores. |
| use_mmap | BOOLEAN | false | Memory mapping. set True if faster model loading. |
| use_mlock | BOOLEAN | false | Lock model in RAM (prevent swap). Uses more RAM. |
| offload_kqv | BOOLEAN | true | Offload KV Cache to GPU. Turn OFF to save VRAM (will be slower). |
| chat_handler | COMBO | none | Chat template for multimodal models. |
| chat_format | COMBO | none | Chat format for text-only models. |
| force_mmproj | BOOLEAN | true | Force load mmproj even without images (preserves template for enable_thinking). |
| enable_thinking | BOOLEAN | false | Enable thinking/reasoning process (for Gemma, Qwen, MiniCPM, GLM, etc.) |
| verbose | BOOLEAN | false | Verbose llama.cpp logging |
| debug | BOOLEAN | true | Output timing info to console |
| type_k | COMBO | F16 | 34 options: F32, F16, Q4_0, Q4_1, Q5_0, Q5_1, +28 |
| type_v | COMBO | F16 | 34 options: F32, F16, Q4_0, Q4_1, Q5_0, Q5_1, +28 |
| config_overrideopt | STRING | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| config | STRING | β |