LMStudio - Connect
Hook a local LLM into ComfyUI without ever touching an API key
- Connection
- Status
Connect is the boring node, and the pack dies without it
The name is a small lie: Connect doesn't call any paid API, needs no key, and doesn't generate anything itself. It's the plumbing. You give it the address of an LM Studio server running on your machine, it remembers which model you want, and it hands a bundle of settings to the pack's other two nodes. On its own it produces nothing visible - the entire point is that Connection output.
Why reach for it at all? Because running a local LLM inside your ComfyUI graph is genuinely useful, and this is the cheapest way to get there. You already have LM Studio for GGUF-quantized models (Q4_K_M for tight VRAM, Q8 when it fits - the same ladder you know from Flux and video). This node is the bridge that lets a graph call that server instead of you alt-tabbing to type prompts. The LLM work happens on LM Studio's side, so ComfyUI's GPU stays free for the diffusion part.
How it actually works
The node registers two routes on ComfyUI's own server: GET /lmstudio/models and GET /lmstudio/test. Refresh Models hits the first and populates the model dropdown from the server's /v1/models endpoint. Test Connection checks reachability and reports how many models it found. At execution, if test_connectivity is on it re-validates, then packs everything into a frozen LMSTUDIO_CONNECTION payload that the Text Gen and Image To Text nodes unwrap.
A small nicety: the URL is normalized for you. The tooltip says "no /v1", and the code backs that up - it strips a stray trailing /v1 so you can't type it twice by accident.
The inputs that matter
Most of these are set once and forgotten.
- server_url - default
http://127.0.0.1:1234. That's LM Studio's default local port. Change it only if you moved the server or it runs on another machine (the placeholder even shows a LAN IP). - model - a dropdown that starts at
<refresh models>. Don't try to type a model here; click Refresh Models and pick from what the server reports. This trips up everyone on first run. - thinking -
auto/on/off.autois right for most people: it defers to the model, but forces reasoning on for Gemma-family models that stay silent otherwise, and leaves Qwen3-style models alone since they already think by default.offsuppresses reasoning so the model answers directly instead of burning tokens on a hidden<think>trace.
Behind those sit api_token (leave - for a local server), max_tokens (1024), temperature (0.7), timeout_seconds (600), and test_connectivity. One trap: use_tooling_mcp sounds exciting but currently just sends a metadata flag saying "MCP requested" - it doesn't wire up real tools. Leave it off unless you know your LM Studio session is configured for it.
Outputs: Connection (the LMSTUDIO_CONNECTION payload) goes into the two generation nodes; Status is a string summary you can preview or log.
Installing it
ComfyUI Manager: search "LMStudio Remote Nodes". Or the manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/glonlas/comfyUI-LMStudio-nodes
pip install -r requirements.txt
Then restart ComfyUI. Dependencies are mercifully light - openai, numpy, Pillow - and there are no model downloads, because the models live in LM Studio, not in ComfyUI. One real requirement: this pack is written against the newer comfy_api extension API, so if the nodes don't appear, update ComfyUI first.
Where people get burned
The number one failure is LM Studio itself: the dropdown stays empty and Test Connection fails when the server isn't running. In LM Studio you have to start the local server (the Developer tab / "Start Server" toggle, port 1234) and actually load a model - installed but unloaded is the same as absent to this node.
Also keep your expectations calibrated. The README calls this a "quickly vibecoded utility project" and the install base is tiny. It's unofficial, small (a handful of files), and MIT-licensed. Since custom nodes execute arbitrary Python on import and this one reaches out over HTTP, it's worth the two minutes to eyeball the source before you trust it with a workflow. That's not this pack's problem specifically - it's the whole ecosystem's, and the cheap insurance is reading the code.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| server_url | STRING | http://127.0.0.1:1234 | LMStudio server address, e.g. http://127.0.0.1:1234 (no /v1). |
| model | COMBO | <refresh models> | Loaded model to use. Click 'Refresh Models' to populate this dropdown from the server, then pick one. |
| thinking | COMBO | auto | Controls the model's reasoning phase. • auto — let the model decide; Gemma-family models are nudged on (they stay silent otherwise). • on — force reasoning on (enable_thinking:true). • off — suppress reasoning so the model answers directly, saving tokens. |
| api_token | STRING | - | Bearer token for the LMStudio OpenAI-compatible API. Leave '-' for local servers. |
| use_tooling_mcp | BOOLEAN | false | Signal intent to use MCP tooling. Only useful when the target model/session is configured for tool-enabled responses. |
| max_tokens | INT | 10241–1000000 | Max output tokens for downstream generation nodes. |
| temperature | FLOAT | 0.700–2 | Sampling temperature for downstream generation nodes. |
| timeout_seconds | INT | 6001–3600 | HTTP request timeout for all LMStudio calls. |
| test_connectivity | BOOLEAN | true | When enabled, validate server reachability and model availability during execution. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| Connection | LMSTUDIO_CONNECTION | Reusable LMStudio connection payload for text/image nodes. |
| Status | STRING | Connection status summary. |