Nodes/ComfyUI-llama_Dapao/🤖大炮本地模型加载器@炮老师的小课堂
ComfyUI Node

🤖大炮本地模型加载器@炮老师的小课堂

The one place you load the model for the whole chat workbench

By paolaoshi·Created 4 months ago·Updated 2 days ago· 44
🤖大炮本地模型加载器@炮老师的小课堂
    • 🤖本地模型
    🧬模型系列Qwen3.8-VL
    🤖主模型
    🖼️视觉投影mmproj
    🧠启用思考false
    🧾保留历史thinkfalse
    📐上下文长度8192
    🎮GPU层数-1
    🗜️KV缓存K类型默认(F16)
    🗜️KV缓存V类型默认(F16)
    🧩MoE专家上CPUfalse
    🔢前N层专家上CPU0
    🧠Qwen3.8推理强度关闭
    🧹推理后卸载模型false

    Every other node in this pack bundles model loading into the node itself. DapaoLocalModelLoader ("大炮本地模型加载器") is the deliberate exception: it's the single model source for the separate chat workbench - DapaoMultiTurnChatV2 plus DapaoChatSettings, DapaoSkillLoader, and DapaoLocalChatMaterialLibrary. Load once here, feed the same model to everything. If you're building that workbench, this is where the workflow starts, and the README's recommended wiring is exactly that: loader → chat, loader → Skill loader → chat.

    The mechanism is the same llama.cpp/GGUF load the whole pack uses, but with a few knobs the all-in-one nodes don't expose, because here the model stays loaded and shared across turns.

    The inputs that matter

    • 🧬模型系列 - Qwen3-VL / Qwen3.5-VL / Qwen3.6-VL / Qwen3.8-VL. Pick the family that matches your GGUF so the loader sets the right chat template and thinking behavior.
    • 🤖主模型 and 🖼️视觉投影mmproj - the GGUF and its vision projection, both scanned from ComfyUI/models/LLM/. The tooltip is blunt: image chat requires a matching mmproj; pure text can use "无".
    • 🎮GPU层数 - -1 (default) = put as much on GPU as possible; 0 = pure CPU; a positive number = only that many layers on GPU. This is your share-the-card control.
    • 🗜️KV缓存K类型 / 🗜️KV缓存V类型 - F16 by default (quality and compatibility), or Q8_0 to save VRAM on big models. The Q8_0-on-KV-cache trade is real: it frees memory but can shift output slightly - same family of trade as the GGUF quality ladder the KB documents.
    • 🧹推理后卸载模型 - the workbench's unload switch. Off = model stays resident so chat turns are fast; on = GGUF + mmproj get released after every run, which is the right call when the same card has to sample images between chats.
    • The Qwen-specific pair: 🧩MoE专家上CPU and 🔢前N层专家上CPU (only for Qwen3.6-VL, use only when VRAM-tight, expect it to slow down), and 🧠Qwen3.8推理强度 for the Qwen3.8 family.

    How it behaves

    The node hands out a DAPAO_LOCAL_MODEL object - the loaded model plus its settings and chat handler - on its 🤖本地模型 output. The chat node reads that, and the workbench's cleanup logic unloads the model after each run if you asked for it. There's one wrinkle worth knowing: if you haven't put any GGUF in models/LLM, the dropdown shows a placeholder "(请把GGUF模型放入ComfyUI/models/LLM)" and the node refuses to load with a clear error. That's not a crash - it's the pack telling you where the model goes.

    Installing it

    Standard pack install:

    cd ComfyUI/custom_nodes
    git clone https://github.com/paolaoshi/ComfyUI-llama_Dapao
    

    then requirements + restart. The dependency story is the pack-wide one: llama-cpp-python is pinned to the JamePeng fork at a 0.3.47+ commit, because stock PyPI 0.3.35 can't load Qwen3.8 GGUFs (the tell-tale missing tensor 'blk.64.ssm_conv1d.weight' error). CPU installs build from source; NVIDIA users install a matching GPU wheel from the JamePeng releases and --force-reinstall it over the source build, then restart ComfyUI. And yes - a Q8_0 KV cache on a big context can be the difference between a workbench that runs on your card and one that OOMs, so start with -1 GPU layers and dial back from there.

    Category🍭大炮-llama-cpp

    Inputs (13)

    NameTypeDefaultDescription
    🧬模型系列COMBOQwen3.8-VL4 options: Qwen3-VL, Qwen3.5-VL, Qwen3.6-VL, Qwen3.8-VL
    🤖主模型COMBOGGUF 主模型,放入 ComfyUI/models/LLM。
    🖼️视觉投影mmprojCOMBO图片对话必须选择与主模型匹配的 mmproj;纯文本可选“无”。
    🧠启用思考BOOLEANfalse
    🧾保留历史thinkBOOLEANfalse关闭可减少多轮对话的上下文占用。
    📐上下文长度INT81921024–327680
    🎮GPU层数INT-1-1–9999-1=尽可能全部放入GPU,速度最快;0=纯CPU;正数=仅指定层数放入GPU。
    🗜️KV缓存K类型COMBO默认(F16)F16质量与兼容性优先;Q8_0更省显存,部分大模型可能更快。
    🗜️KV缓存V类型COMBO默认(F16)F16质量与兼容性优先;Q8_0更省显存,部分大模型可能更快。
    🧩MoE专家上CPUBOOLEANfalse仅Qwen3.6-VL生效。显存不足时使用,通常会变慢。
    🔢前N层专家上CPUINT00–256仅Qwen3.6-VL生效;开启全部专家上CPU时忽略。
    🧠Qwen3.8推理强度COMBO关闭仅Qwen3.8生效;关闭时不输出思考。
    🧹推理后卸载模型BOOLEANfalse关闭=模型常驻显存,后续对话更快;开启=每次完成或报错后立即卸载GGUF和mmproj并释放显存,下一轮需要重新加载模型。

    Outputs (1)

    NameTypeDescription
    🤖本地模型DAPAO_LOCAL_MODEL