Nodes/ComfyUi_zaknak_nodes/Compatible Endpoint
ComfyUI Node

Compatible Endpoint

The one node that points your workflow at LM Studio

By zaknak·Created 6 months ago·Updated 6 months ago· 0
Compatible Endpoint
    • endpoint
    • model_name
    • models_json
    • status_text
    base_urlhttp://127.0.0.1:1234/v1
    api_key
    model_name
    refresh_modelstrue
    timeout_seconds10.0

    The whole "Compatible LLM/VLM" family in this pack is built on one idea: ComfyUI shouldn't run the language model - that's a server's job. You spin up an OpenAI-compatible API (LM Studio, llama.cpp's server, Ollama's /v1, vLLM), and these nodes just talk to it. Compatible Endpoint is the node that owns that conversation's address book. Every other node in the family hangs off it.

    Important framing: this node never calls the LLM. It stores connection settings, optionally fetches the model list, and hands a bundled COMPATIBLE_ENDPOINT object to the nodes that do the actual chatting. That separation is the pack's whole design, and it keeps the send nodes' UIs blessedly small.

    How it works

    The default base_url is http://127.0.0.1:1234/v1 - which is exactly LM Studio's default API address. So for the most common local setup, you change nothing: install the pack, start LM Studio, wire this node in, done. It does an HTTP GET to {base_url}/models via Python's standard urllib (no openai SDK, no extra deps - worth noting given how many LLM-adjacent nodes have burned people on supply chain), pulls out the model IDs, and if model_name is left blank it auto-selects the first model the server reports.

    All the connection state is packed into the custom endpoint output - base URL, API key, chosen model, timeout. That single output is what you feed into Chat Once or Vision Chat Once.

    The inputs and outputs that matter

    • base_url - default LM Studio; point it at any compatible server.
    • api_key - leave blank for local servers; a bearer token goes here if you need one.
    • model_name - blank means "auto-pick first from the list."
    • refresh_models (true) - whether to bother querying /models.

    Outputs: endpoint (the connection bundle), model_name (what got selected), models_json (raw model list as a string - feed this to Compatible Model List View / Compatible Model Selector), and status_text, a human-readable summary like models fetched: 3 | model_name=qwen2.5:7b. When things go wrong, read status_text first.

    Install

    Part of ComfyUi_zaknak_nodes - ComfyUI Manager, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/zaknak/ComfyUi_zaknak_nodes
    

    Restart. No model downloads here - the models live in your local server, not ComfyUI.

    Troubleshooting

    • Model fetch failed but the node still works: fetching /models is non-fatal by design. Type model_name manually and carry on - status_text will say what failed.
    • Some servers don't implement /models the same way (or at all). Again, manual model_name is the fallback, and it's reliable.
    • model_name isn't in the fetched list: the node doesn't error, it just annotates status_text with "model_name not found in fetched models." That's a hint to refresh or re-type, not a crash.
    • A successful /models fetch doesn't guarantee inference works. Connection ≠ the model actually loading. The chat nodes will tell you the truth.
    Categoryzaknak/llm

    Inputs (5)

    NameTypeDefaultDescription
    base_urlSTRINGhttp://127.0.0.1:1234/v1
    api_keySTRING
    model_nameSTRING
    refresh_modelsBOOLEANtrue
    timeout_secondsFLOAT10.00.1–300

    Outputs (4)

    NameTypeDescription
    endpointCOMPATIBLE_ENDPOINT
    model_nameSTRING
    models_jsonSTRING
    status_textSTRING