Nodes/ComfyUI-DesignPack/全局LLM管理器
ComfyUI Node

全局LLM管理器

LLMManager Is the Unlovely First Step of This Pack

By dseditor·Created about a year ago·Updated about a year ago· 3
全局LLM管理器
    • test_results
    ollama_modelgemma3:12b
    gemini_modelgemini-2.5-flash
    gemini_api
    openai_modelgpt-4o-mini
    openai_urlhttps://api.openai.com/v1
    openai_key

    Every node in ComfyUI-DesignPack is a chain of LLM calls, and they all read their credentials from one place: a config.json the pack keeps in its own folder. LLMManager is how you write that file. It's not a glamorous node - no images, no prompts, no diffusion - but if you skip it, the pack's generators will hand you error strings in Chinese and refuse to do anything. Think of it as paying your electricity bill before complaining the lights are out.

    What it actually does

    Run the node once and it saves six settings to config.json, then fires a tiny test request to each provider you've filled in to prove the connection works. The single output, test_results, is a plaintext report like Gemini (gemini-2.5-flash): Gemini可用 - one line per provider. The pack's own example workflow wires that output into a ShowText node so you can actually read it, which you should, because nothing else in the graph shows you what happened.

    The tests are honest about what they hit. Ollama posts a "你好" to http://localhost:11434/api/generate - local, no key, no cloud. Gemini calls genai.generate_content with your key. OpenAI posts to {openai_url}/chat/completions, which means that field is happy with any OpenAI-compatible endpoint, not just the official one.

    The inputs that matter

    Six required string inputs, and you mostly care about three:

    • gemini_api - your Google Gemini API key. This is the pack's default provider, and it's the one most people end up using.
    • ollama_model - default gemma3:12b. If you'd rather keep everything local, this is the model the generators will call. Needs Ollama installed and running, with the model pulled: ollama pull gemma3:12b.
    • openai_key / openai_url - for the OpenAI path. Only needed if you pick it.

    The remaining two, gemini_model (default gemini-2.5-flash) and openai_model (default gpt-4o-mini), are just which model names get sent. The node only tests what you filled in, so you can leave providers blank and use one.

    Installing it

    It's one of five nodes in the same pack, so install the pack once:

    cd ComfyUI/custom_nodes
    git clone https://github.com/dseditor/ComfyUI-DesignPack
    cd ComfyUI-DesignPack
    pip install -r requirements.txt
    

    Then restart ComfyUI. Or just search "ComfyUI-DesignPack" in ComfyUI Manager and hit Install - same result. The requirements are google-generativeai, python-pptx, reportlab, requests, plus things ComfyUI already has (torch, numpy, pillow). There are no model files to download; the "model" here is a cloud API or your local Ollama install.

    Where people get burned

    The obvious one: you paste your Gemini key, run it, and the test_results output shows a failure. Ninety percent of the time it's a bad key or a machine that can't reach Google - the README's whole troubleshooting section for this boils down to "check the key and the network."

    The less obvious one is that this node stores your keys in plaintext in config.json inside the custom node folder. The file is gitignored so it won't leak into a clone, but it's sitting on your disk as readable text, and this is exactly the shape of node that deserves a skeptical read before you run it. I skimmed the source - it's ~150 lines of straightforward requests and Google SDK calls going to precisely the endpoints you typed, nothing sneaky. That's the right bar for a node that holds a credential and phones home by design.

    One genuinely useful quirk: the pack's generators read the same config.json, so you only configure your API setup once, in this node, and the generator nodes pick it up without you re-entering anything. It's the rare case where "run this once and forget it" is literally true.

    Categoryllm_manager

    Inputs (6)

    NameTypeDefaultDescription
    ollama_modelSTRINGgemma3:12b
    gemini_modelSTRINGgemini-2.5-flash
    gemini_apiSTRING
    openai_modelSTRINGgpt-4o-mini
    openai_urlSTRINGhttps://api.openai.com/v1
    openai_keySTRING

    Outputs (1)

    NameTypeDescription
    test_resultsSTRING