🏷️ Select Model
Tell the request which local model to use — and get it right the first time
- model
🏷️ Select Model is the pack's "which brain is talking" node. It takes a model identifier string and hands it to 📡 LMStudio Request, which passes it along to LM Studio's server in the API call. That's basically the whole job - and it's a less trivial job than it looks, because if the identifier doesn't exactly match a model LM Studio has loaded, your request dies with a model-not-found error before it generates a single token.
The one input
- model_identifier - a single-line string, defaulting to
gemma-2b-it-gguf. That default is the trap: it's just a plausible-looking placeholder. Unless you genuinely have a model with that exact id loaded, change it.
The output is a model string that goes into 📡 LMStudio Request's model input. The node also refuses empty input - if you leave it blank it raises an error rather than sending a garbage request.
Where you actually get the identifier
Don't guess, and don't copy it from the model file name. The author's own instruction: in LM Studio, load the model you want, switch to the Local Server tab, and at the top you'll see "Select a model to load" with the model's identifier underneath. Copy that exact string - it's what the API needs, and it's often not the filename.
Why the fuss? LM Studio serves quantized local models, typically GGUF files - the single-file quantized format that's become the standard for running 12B+ models on consumer VRAM. The identifier is the server's handle for whichever GGUF you have loaded, and it has to match byte-for-byte. Paste, don't type.
Why it exists as a node at all
You could just type the model name into a string input on the Request node. Keeping it separate does two things: it gives you a named, labeled place to set the model once per workflow, and it makes swapping models a one-widget change instead of hunting through a request node. It also means a workflow JSON shared with someone else carries the model choice explicitly - which is useful, because the exact model id is machine-dependent. A shared workflow will need the recipient's own identifier.
That machine-dependence is worth a beat: this is a "write-once, update-per-machine" field. Your workflow remembers gemma-2b-it-gguf (or whatever you typed), but your collaborator's LM Studio might have it as gemma-2-2b-it-Q4_K_M.gguf or something entirely different. Expect to fix this whenever you open someone else's workflow.
Install
Nothing special here - the pack installs once for all seven nodes. ComfyUI Manager, search "LM Studio Tools" (Hazukiaoi/ComfyUI-LM_Studio_Tools), install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/Hazukiaoi/ComfyUI-LM_Studio_Tools
The pack's only Python dependency is requests; no models to download. And the rest of the chain must be running before this node's output is any use - LM Studio with the Local Server on, plus an ⚙️ API Config wired up.
If your request comes back with a model-not-found or 404 error, this is the first node to check. Open LM Studio's Local Server tab, copy the identifier it shows for the loaded model, and paste it here. It's a five-second fix that stumps people for an hour.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| model_identifier | STRING | gemma-2b-it-gguf | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| model | STRING | — |