LC Vision Loader π¬
A Qwen-VL that stays loaded instead of reloading every queue
- vision_model
This is the front door to the LC Vision pack: it loads a Qwen-VL GGUF model plus its mmproj vision projector once and hands a handle downstream to the Caption, Prompt Enhancer and Moviemaker nodes. Nothing glamorous happens here. That's the point.
Qwen3-VL is the local captioner this community settled on - a vision-language model doing infrastructure work, not generating images: writing captions for LoRA datasets, or reading an image to seed an img2img prompt. The usual way to run one in ComfyUI is the QwenVL-Mod family, and that path is fiddly on a shared GPU. So the first design decision here is a Loader/Run split, and it isn't cosmetic: ComfyUI caches a node's output and skips re-running it while its inputs are unchanged, so the model sits resident across queued runs instead of being rebuilt around every call.
How it works
On import the pack registers an LLM folder key pointing at models/LLM if ComfyUI doesn't already have one. The Loader walks every path registered under that key, pairs each model .gguf with an mmproj .gguf in the same folder - reading the GGUF header itself to check the architecture - and only lists pairs that have both halves. A model with no vision projector beside it is invisible here. Half a model isn't a model.
When you queue something it builds a llama_cpp.Llama with Qwen3VLChatHandler, falling back to Qwen25VLChatHandler on older installs. Two build details separate it from a naive wrapper: n_ubatch is set to match n_batch, and the model is built with swa_full=True, which sidesteps the sliding-window KV-cache checkpoint path where the reused-model decode failures in this stack live.
Inputs that matter
model_name is the only one you must get right. device (auto/cuda/cpu) prefers CUDA when torch says it's there; n_gpu_layers at -1 offloads everything, 0 forces CPU, anything else splits. n_ctx defaults to 32768 tokens, generous for captioning and worth dropping if VRAM is tight.
Then n_batch (default 2048), the field with a real footgun attached: llama-cpp-python defaults n_ubatch to 512 independently and internally takes the smaller of the two, so raising n_batch alone does nothing. This node sets both. If a multi-reference call overflows, this is the dial - alongside max_image_side on the Caption node, not instead of it.
Of the optionals, image_min_tokens (default 1024) matters most: Qwen-VL wants at least that much to ground reliably. batch_max_tokens is the vision handler's own per-batch image-embedding ceiling, separate from n_batch, and the second thing to raise when you're feeding several large references.
Output is one vision_model handle. Wire it into any of the three Run nodes.
Models
The dropdown lists what's already on disk plus a few Download: entries. Pick one and it pulls the model and its mmproj-f16 from HuggingFace into the folder discovery already scans; the entry then disappears. Qwen3-VL 4B and 8B, abliterated, at Q8_0 or f16 - Q8_0 if you're low on VRAM or just setting up, f16 if the card is roomy. GGUF is doing its usual job here: Q8 is roughly fp16 at half the size, which is what lets a language model share a card with your diffusion pipeline at all. The author's rule of thumb: 4B for Moviemaker and video workloads, 8B for captioning.
Install
ComfyUI Manager, search ComfyUI LC Vision Nodes, or:
cd ComfyUI/custom_nodes
git clone https://github.com/lonecatone23/ComfyUI_LC_Vision_nodes.git
Check that __init__.py sits directly inside ComfyUI_LC_Vision_nodes/, not nested a level down - unzipping too deep is the classic mistake, and the pack warns you if it happens.
There's no requirements.txt worth trusting, because the dependency can't be resolved from PyPI. The vision chat handlers only exist in the JamePeng/llama-cpp-python fork, which publishes wheels as GitHub release assets - one per exact Python Γ platform Γ CUDA combination. That's what install.py is for, and ComfyUI Manager runs it automatically: it checks whether a vision-capable llama_cpp is already importable and exits if so, otherwise it detects your Python, OS and CUDA, picks the closest matching wheel, snapshots pip freeze, uninstalls any stale llama-cpp-python first, and installs with --no-deps. It only touches numpy/pillow if pip check blames llama-cpp-python itself.
Restart ComfyUI afterwards. You should see the LC Vision load line listing four nodes.
When it goes wrong
"No vision GGUF models found." A model is there without its mmproj sibling, or they're in different folders. Both files, same directory.
"llama_cpp is not installed, or the installed copy lacks vision support." The wheel step didn't land - usually no release asset matches your Python Γ CUDA combination. Grab the right wheel from the fork's releases page manually (the community rule is the same: from those release assets, never from PyPI), or compile from source with -DLLAMA_CPP_PYTHON_VISION=on.
Test on device: cpu first - not for performance, but so the first run can't collide with whatever else holds the GPU. And remember the budget: you're holding an LLM and a diffusion model at once. The first Download: selection is also a 5β18GB fetch with no progress bar in the node.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| model_name | COMBO | Vision-capable GGUF models found under models/LLM/GGUF (or any path registered under the 'LLM' folder key) -- only files with an mmproj sibling in the same folder are listed. Entries prefixed 'Download:' aren't on disk yet -- selecting one downloads it (and its mmproj) on first use, matching upstream QwenVL-Mod's own auto-download behavior. | |
| device | COMBO | auto | auto prefers CUDA when available. Any option works from the same install -- CPU inference doesn't need a separate CPU-only build. |
| n_gpu_layers | INT | -1-1β999 | -1 offloads every layer to GPU. 0 forces CPU-only. Any other value offloads that many layers, leaving the rest on CPU RAM. |
| n_ctx | INT | 32768512β131072 | Context window in tokens. |
| n_batch | INT | 204864β32768 | Per-decode-call token capacity. Also sets n_ubatch to the same value -- llama-cpp-python defaults n_ubatch to 512 independently of n_batch (n_ubatch = min(n_batch, n_ubatch) internally), so raising n_batch alone silently does nothing unless n_ubatch tracks it. Raise this if a large or multi-reference input overflows it. |
| image_min_tokensopt | INT | 1024-1β16384 | -1 = model default. Qwen-VL models want at least 1024 for reliable grounding. |
| image_max_tokensopt | INT | -1-1β16384 | -1 = no cap beyond n_batch. |
| batch_max_tokensopt | INT | 102464β16384 | The vision chat handler's own per-batch token limit for image embedding, separate from n_batch/n_ubatch. Raise alongside n_batch for multiple large references. |
| verboseopt | BOOLEAN | false | Print llama.cpp's own internal load/inference diagnostics to the console. Off by default to keep logs readable. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| vision_model | LC_VISION_MODEL | β |