Nodes/CC Llama Vision/CC Llama Vision Advanced Options
ComfyUI Node

CC Llama Vision Advanced Options

The settings drawer for CC Llama Vision (you'll actually touch four knobs)

By cicalooo·Created 2 months ago·Updated 2 months ago· 1
CC Llama Vision Advanced Options
    • advanced_options
    temperature0.90
    top_p0.90
    top_k64
    min_p0.00
    repeat_penalty1.00
    presence_penalty0.00
    frequency_penalty0.00
    seed0
    disable_thinkingtrue
    stop_sequences
    n_gpu_layers99
    ctx_size8192
    threads0
    threads_batch0
    extra_server_args
    keep_server_alivefalse
    idle_timeout_s60
    force_restartfalse
    startup_timeout_s60
    request_timeout_s300
    debugtrue
    server_log_path/root/Documents/ComfyUI/llama_server_debug.log

    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. Set idle_timeout_s to 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.

    Categoryllama.cpp

    Inputs (22)

    NameTypeDefaultDescription
    temperatureFLOAT0.900–2Sampling temperature. Higher = more random/creative, lower = more deterministic/focused.
    top_pFLOAT0.900–1Nucleus sampling threshold — only tokens within this cumulative probability mass are considered.
    top_kINT640–1000Only the top K most likely tokens are considered at each step. 0 disables this filter.
    min_pFLOAT0.000–1Minimum probability (relative to the top token) a token must have to be considered.
    repeat_penaltyFLOAT1.000–2Penalty applied to tokens that have already appeared, to discourage repetition.
    presence_penaltyFLOAT0.00-2–2Penalty applied per unique token already present in the output, encouraging new topics.
    frequency_penaltyFLOAT0.00-2–2Penalty scaled by how often a token has already appeared, discouraging repetition.
    seedINT0-1–18446744073709550000Random seed for generation. -1 for random each run; a fixed value makes output reproducible.
    disable_thinkingBOOLEANtrueIf enabled, disables the model's internal 'thinking'/reasoning mode (for models that support it) so it responds directly.
    stop_sequencesSTRINGOne stop string per line; generation halts early if any of these strings are produced.
    n_gpu_layersINT990–200Number of model layers to offload to GPU. Higher = faster but more VRAM; set to 0 for CPU-only.
    ctx_sizeINT8192512–131072Context window size (tokens) for the server. Larger allows longer prompts/images but uses more VRAM/RAM.
    threadsINT00–256Number of CPU threads for generation. 0 = let llama-server auto-detect.
    threads_batchINT00–256Number of CPU threads for batch/prompt processing. 0 = let llama-server auto-detect.
    extra_server_argsSTRINGAdditional raw command-line arguments passed through to llama-server (advanced use).
    keep_server_aliveBOOLEANfalseKeep llama-server running after this node finishes so future runs can reuse it instead of restarting (faster, but keeps VRAM occupied).
    idle_timeout_sINT600–3600If 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_restartBOOLEANfalseKill and restart any matching existing server before running, even if one is already alive and healthy.
    startup_timeout_sINT605–300How many seconds to wait for llama-server to report healthy before giving up on startup.
    request_timeout_sINT30030–1800How many seconds to wait for a response to the captioning request before timing out.
    debugBOOLEANtruePrint the raw JSON response from llama-server to the console for troubleshooting.
    server_log_pathSTRING/root/Documents/ComfyUI/llama_server_debug.logFile path where llama-server's stdout/stderr log will be written — check this file if startup fails.

    Outputs (1)

    NameTypeDescription
    advanced_optionsLLAMA_VISION_OPTS