CC Llama Vision Advanced Options
The settings drawer for CC Llama Vision (you'll actually touch four knobs)
- advanced_options
This node is the cleanest trick in the ComfyUI-cc_llama_vision pack: it takes twenty-two settings and hides them in a drawer so the main CC Llama Vision node stays a tidy box of model selection and prompts. You drop it in, connect its single advanced_options output to the main node's advanced_options input, and everything it controls - sampling, performance, lifecycle, diagnostics - flows through as one bundle.
Here's the part that should lower your blood pressure: if you don't connect it at all, the main node falls back to exactly the same defaults this node ships with. The README says so, and the code does it by keeping one shared defaults dict. So the node is strictly optional. It exists so you can change one thing without either editing a buried widget or rebuilding the whole node.
How it works
There's no magic here. It's a pass-through builder: its build function packs all the widget values into a LLAMA_VISION_OPTS dict and returns it. The main node merges that dict over its own defaults on every run. Since the server's launch config is derived from those values, changing a performance setting also changes the server's config key - which means a kept-alive server gets killed and restarted with the new values next run. That's the mechanism behind the "port already in use" fix in the changelog: switch models or settings, and the old server on that port is restarted automatically instead of erroring.
The knobs that actually matter
Most of these you will never touch, and that's fine. The four worth knowing:
n_gpu_layers- layers offloaded to GPU, default 99 (everything). Higher = faster but more VRAM; set 0 for CPU-only. If the LLM is making your diffusion model OOM, this is the first lever.ctx_size- context window in tokens, default 8192. Bigger lets the model swallow longer prompts and more image tokens, but eats VRAM/RAM. The 512–131072 range means you can push it way up, just don't do that for fun.keep_server_alive+idle_timeout_s- the lifecycle pair. Keeping the server alive makes repeated runs much faster (no model reload), but it sits in VRAM the whole time. The idle timeout (default 60s) auto-kills it - note the check runs when a CC Llama Vision node next executes, not on a background timer, so it's lazy cleanup, not a watchdog. Setidle_timeout_sto 0 to never auto-unload.disable_thinking- default true, which for captioning is right: you want the model to answer, not narrate its reasoning. Flip it off only if you actually want chain-of-thought in the output.
Then there's the long tail: the sampling stack (temperature 0.9, top_p 0.9, top_k 64, min_p, repeat_penalty, presence_penalty, frequency_penalty, seed) are standard llama.cpp sampling parameters passed straight to the server - the usual rule applies, lower temperature for consistent captions. stop_sequences takes one stop string per line. threads/threads_batch default to 0 = auto-detect, which is what you want on modern CPUs. extra_server_args is raw passthrough to the llama-server command line for the genuinely advanced - quoting on Windows is handled for you. And the diagnostics pair: debug (default true) dumps the raw JSON response to the console - noise during normal runs, gold when something's wrong - and server_log_path is where llama-server's stdout/stderr goes, which is the first file to open if startup fails.
How to install it
It installs with the pack - there's no separate download. ComfyUI Manager, search "CC Llama Vision", or:
cd ComfyUI/custom_nodes
git clone https://github.com/doggeddalle/ComfyUI-cc_llama_vision
Restart, and the node appears in the llama.cpp category. The pack's only real dependencies are a llama-server binary on PATH (Windows: winget install llama.cpp) plus a GGUF vision model and matching mmproj file - the node adds no heavy Python deps.
Gotchas
The main one is a version artifact: before 1.1.1, all these settings were widgets directly on the main node. If you're loading a workflow saved with the old layout, the moved widgets won't map cleanly - the changelog flags it as a breaking change, and the fix is to add an Advanced Options node (or re-add the workflow) and reconnect your custom values. Also remember that because this node is just a settings bundle, it does nothing by itself - wire its output into the main node's advanced_options input, or you've built a very detailed paperweight.
Inputs (22)
| Name | Type | Default | Description |
|---|---|---|---|
| temperature | FLOAT | 0.900–2 | Sampling temperature. Higher = more random/creative, lower = more deterministic/focused. |
| top_p | FLOAT | 0.900–1 | Nucleus sampling threshold — only tokens within this cumulative probability mass are considered. |
| top_k | INT | 640–1000 | Only the top K most likely tokens are considered at each step. 0 disables this filter. |
| min_p | FLOAT | 0.000–1 | Minimum probability (relative to the top token) a token must have to be considered. |
| repeat_penalty | FLOAT | 1.000–2 | Penalty applied to tokens that have already appeared, to discourage repetition. |
| presence_penalty | FLOAT | 0.00-2–2 | Penalty applied per unique token already present in the output, encouraging new topics. |
| frequency_penalty | FLOAT | 0.00-2–2 | Penalty scaled by how often a token has already appeared, discouraging repetition. |
| seed | INT | 0-1–18446744073709550000 | Random seed for generation. -1 for random each run; a fixed value makes output reproducible. |
| disable_thinking | BOOLEAN | true | If enabled, disables the model's internal 'thinking'/reasoning mode (for models that support it) so it responds directly. |
| stop_sequences | STRING | One stop string per line; generation halts early if any of these strings are produced. | |
| n_gpu_layers | INT | 990–200 | Number of model layers to offload to GPU. Higher = faster but more VRAM; set to 0 for CPU-only. |
| ctx_size | INT | 8192512–131072 | Context window size (tokens) for the server. Larger allows longer prompts/images but uses more VRAM/RAM. |
| threads | INT | 00–256 | Number of CPU threads for generation. 0 = let llama-server auto-detect. |
| threads_batch | INT | 00–256 | Number of CPU threads for batch/prompt processing. 0 = let llama-server auto-detect. |
| extra_server_args | STRING | Additional raw command-line arguments passed through to llama-server (advanced use). | |
| keep_server_alive | BOOLEAN | false | Keep llama-server running after this node finishes so future runs can reuse it instead of restarting (faster, but keeps VRAM occupied). |
| idle_timeout_s | INT | 600–3600 | If a kept-alive server has gone unused for this many seconds, it is killed to free VRAM. The check runs when a CC Llama Vision node next executes (there is no background timer). 0 disables auto-unload. |
| force_restart | BOOLEAN | false | Kill and restart any matching existing server before running, even if one is already alive and healthy. |
| startup_timeout_s | INT | 605–300 | How many seconds to wait for llama-server to report healthy before giving up on startup. |
| request_timeout_s | INT | 30030–1800 | How many seconds to wait for a response to the captioning request before timing out. |
| debug | BOOLEAN | true | Print the raw JSON response from llama-server to the console for troubleshooting. |
| server_log_path | STRING | /root/Documents/ComfyUI/llama_server_debug.log | File path where llama-server's stdout/stderr log will be written — check this file if startup fails. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| advanced_options | LLAMA_VISION_OPTS | — |