Ⓜ️ LM Studio Loader
The unglamorous node that points your LM Studio chat at the right model
- model_config
- model_id
- loaded
Every pack needs one node that does nothing glamorous, and this is it. Ⓜ️ LM Studio Loader answers one question - which LM Studio model should the chat hit? - and hands the answer to the rest of the graph as a config object. It's also the only node in the pack that reaches for the lms CLI, so when your setup misbehaves, it's usually here that you find out why.
How it works
When you add (or refresh) the node, it runs lms ls --json - the LM Studio CLI's model-list command - and turns the LLMs it finds into a dropdown. No CLI on your PATH? It falls back to scanning your LM Studio models folder (~/.lmstudio/models, or whatever LM_STUDIO_MODEL_ROOT points at) for .gguf files. Nothing there either? model_id becomes a plain text box with the placeholder "Type model ID manually" and you type the model name yourself. The dropdown is the single most useful thing here; the fallbacks are the single most confusing.
Outputs: model_config (LMSTUDIO_MODEL) is what you wire into 💬 LM Studio Chat or the pack's 🖼️ Vision node - it carries the model id and the server URL. model_id (STRING) is the raw name if you want it for display. loaded (BOOLEAN) looks like it tells you whether the model is in VRAM. It doesn't. It tells you whether the server is responding - LM Studio loads models on demand, so loaded is really "is the server up". Worth knowing, easy to misread.
The two booleans at the bottom deserve a sentence each. keep_in_memory adds the model to a set the chat node checks before unloading - turn it on and unload_after_chat in the chat node won't evict the model between calls. auto_load is the one that promises to start the server and load the model for you. In the current 1.0.0 code it's the flakiest part of the pack: the server-already-running path has a Python unpacking bug that crashes the node, and the start-server path swallows its own errors. Treat it as broken and skip it - starting the server yourself in LM Studio is more reliable and takes ten seconds.
Install
Same pack as the other two nodes. ComfyUI Manager, search "comfyui-lmstudio-simple", or:
cd ComfyUI/custom_nodes
git clone https://github.com/huagusam/comfyui-lmstudio-simple
Restart and you're done - no requirements.txt, no model downloads. What you actually need is LM Studio installed with its local server running, because the loader mostly reports on that server rather than fixing it.
Troubleshooting
- Dropdown empty, showing "Type model ID manually": the
lmsCLI wasn't found. The pack checks a handful of common locations -%LOCALAPPDATA%\LM Studio\lms.exeon Windows, the path inside the app bundle on macOS - and you can point it at the right one with theLM_STUDIO_CLI_PATHenv var. Note the list is built when the node is created, so open a fresh Loader after starting LM Studio. loadedis false: the server is down. Start it in the app; the loader picks it up next run.- Name doesn't match what you see in LM Studio: the dropdown uses the identifier
lms lsreports, which is often not the friendly display name.
Honestly, this node's job is so small that the only way it goes wrong is the CLI not being found - which is exactly the "Type model ID manually" symptom. Get lms visible and this becomes the most reliable node of the three.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| model_id | COMBO | Type model ID manually | 1 options: Type model ID manually |
| auto_load | BOOLEAN | false | — |
| keep_in_memory | BOOLEAN | false | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| model_config | LMSTUDIO_MODEL | — |
| model_id | STRING | — |
| loaded | BOOLEAN | — |