Nodes/ComfyUI-KYNode/KY Chat with openai-protocol local LLM services
ComfyUI Node

KY Chat with openai-protocol local LLM services

Talk to any local LLM that speaks the OpenAI protocol

By yorkane·Created 2 years ago·Updated 6 months ago· 10
KY Chat with openai-protocol local LLM services
    • text_out
    protocolopenai
    custom_model
    model
    ollama_model
    system_promptYou are a professional translator for chinese and english
    chat_promptHi
    max_tokens200
    temperature0.50
    top_p0.90
    frequency_penalty0.00
    presence_penalty0.00
    base_urlhttp://127.0.0.1:23333
    api_keysk-0123456

    The display name gives it away: "Chat with openai-protocol local LLM services." This isn't a wrapper specifically for OpenAI's hosted API - it's a generic client for anything that speaks the OpenAI-style chat completions API, which by now is most local inference servers: LMDeploy, vLLM, text-generation-webui, LM Studio, and Ollama (which gets its own dedicated protocol mode). Point it at your own server and it'll chat with whatever model you've got loaded.

    The tell that it's built for local, not hosted

    Look at the defaults. base_url defaults to http://127.0.0.1:23333 - port 23333 is the default LMDeploy serving port, which is a strong hint at what this node was actually built against. api_key defaults to the obvious placeholder sk-0123456, which most local servers don't even check. And system_prompt defaults to "You are a professional translator for chinese and english" - a very specific, very personal default that tells you exactly what the author was using this node for day to day.

    The model and ollama_model dropdowns both list vision-language models - OpenGVLab/InternVL3-8B, MiniCPM-V-2_6_awq, qwen2.5vl:7b, JoyCaption - alongside the usual gpt-4o family. That's a real observation worth flagging clearly: despite the model list leaning heavily toward vision models, info_schema has no IMAGE input anywhere on this node. As shipped, it only sends system_prompt and chat_prompt text - there's no wired-in way to attach an image for those vision models to actually look at. Whatever image-in-a-prompt workflow the author had in mind (probably base64-embedding an image string into the prompt manually, or just running text-only tasks like translation against a VLM that also happens to do text) isn't exposed as a first-class input here.

    Inputs that matter

    • protocol - openai or ollama. Picks which API shape it talks.
    • model / custom_model - pick from the dropdown or type any model name your server actually has loaded; custom_model overrides the dropdown when set.
    • system_prompt / chat_prompt - the two message roles you'd expect.
    • max_tokens, temperature, top_p, frequency_penalty, presence_penalty - standard sampling controls, though whether your backend actually honors all of them depends on the server.
    • base_url / api_key - where to send the request and what to authenticate with. Swap base_url to https://api.openai.com/v1 with a real key if you actually want hosted GPT-4o.

    Single output: text_out, the model's response as a string.

    Installing it

    ComfyUI Manager: search ComfyUI-KYNode, install, restart. Or git clone https://github.com/yorkane/ComfyUI-KYNode into custom_nodes and restart. No model weights ship with this - it's a thin HTTP client, so it needs network access to wherever base_url points, whether that's localhost or the real OpenAI API.

    Common issues

    Out of the box, this node points at nothing that exists on a fresh install - 127.0.0.1:23333 is only listening if you've actually got an OpenAI-protocol server running there. You need to either stand one up yourself (ollama serve, an LMDeploy or vLLM instance, LM Studio's local server mode) or repoint base_url at a real hosted API and supply a genuine key.

    If you switch protocol to ollama, remember Ollama only serves models you've already pulled - the ollama_model dropdown lists names, it doesn't install them; run ollama pull <model> first or you'll get a not-found error.

    If you want a vision-capable model to actually look at an image, this node's current input set doesn't give you a direct way to do it - you'd need to encode the image yourself (base64 into chat_prompt, if your server's chat endpoint accepts inline image content that way) since there's no dedicated IMAGE socket.

    Sampling parameters that seem to do nothing are a backend issue, not a node bug - some minimal local servers implement only a subset of the OpenAI sampling API and silently ignore the rest.

    CategoryKYNode/LLM

    Inputs (13)

    NameTypeDefaultDescription
    protocolCOMBOopenai2 options: openai, ollama
    custom_modelSTRING
    modelCOMBO6 options: gpt-4o, gpt-4o-mini, chatgpt-4o-latest, gpt-4-turbo, OpenGVLab/InternVL3-8B, MiniCPM-V-2_6_awq
    ollama_modelCOMBO6 options: aha2025/llama-joycaption-beta-one-hf-llava:Q8_0, qwen2.5vl:7b, qwen2.5vl:32b, XiaomiMiMo/MiMo-VL-7B-RL, openbmb/minicpm-o2.6, openbmb/minicpm-v2.6
    system_promptSTRINGYou are a professional translator for chinese and english
    chat_promptSTRINGHi
    max_tokensINT200
    temperatureFLOAT0.50
    top_pFLOAT0.90
    frequency_penaltyFLOAT0.00
    presence_penaltyFLOAT0.00
    base_urlSTRINGhttp://127.0.0.1:23333
    api_keySTRINGsk-0123456

    Outputs (1)

    NameTypeDescription
    text_outSTRING