ComfyUI Node
EA LM Studio
A ComfyUI node in EA/LMStudio with 26 inputs and 3 outputs.
EA LM Studio
- image1
- image2
- image3
- image4
- response
- reasoning
- troubleshooting
◄system_messageYou are a helpful assistant.►
◄prompt►
◄model_selection-- Custom (enter below) --►
◄custom_model_name►
◄max_tokens1024►
◄temperature0.70►
◄seed0►
◄image_resizeMedium (768px)►
◄draft_model_selection-- Custom (enter below) --►
◄custom_draft_model►
◄top_p1.00►
◄top_k0►
◄repeat_penalty1.00►
◄min_p0.00►
◄presence_penalty0.00►
◄enable_thinkingModel default►
◄reasoning_modeAuto-detect (recommended)►
◄custom_open_tag<think>►
◄custom_close_tag</think>►
◄unload_llmtrue►
◄unload_comfy_modelsfalse►
◄refresh_modelsfalse►
CategoryEA/LMStudio
Inputs (26)
| Name | Type | Default | Description |
|---|---|---|---|
| system_message | STRING | You are a helpful assistant. | System prompt that defines the LLM's role and behavior. Sets the context for all responses. |
| prompt | STRING | The user prompt to send to the LLM. This is your main request or question. | |
| model_selection | COMBO | -- Custom (enter below) -- | Select a model from LM Studio. Models are fetched at ComfyUI startup. Select 'Custom' to manually enter a model identifier. |
| custom_model_name | STRING | Manual model identifier. Only used when 'Custom' is selected above. Find identifiers in LM Studio's model list. | |
| max_tokens | INT | 10241–131072 | Maximum OUTPUT tokens for the response (default 1024). Limits reply length, not input. Raise for longer replies; lower to cap length/speed up. The model's context window (input+output) is set in LM Studio when loading and must exceed max_tokens for full output. |
| temperature | FLOAT | 0.700–2 | Controls randomness (default 0.7). Lower (0.1-0.3) = more focused/deterministic; higher (0.7-1.2) = more creative/varied. 0.0 = greedy/most deterministic. |
| seed | INT | 00–18446744073709550000 | Seed for ComfyUI workflow reproducibility. Note: LM Studio SDK does not support inference-time seeding. |
| image_resizeopt | COMBO | Medium (768px) | Resize images before processing. Smaller = faster inference. 'No Resize' keeps original size. Only applies when images are connected. |
| image1opt | IMAGE | First image input for vision models (VLMs). Leave unconnected for text-only inference. | |
| image2opt | IMAGE | Second image input for multi-image VLMs. Not all VLMs support multiple images. | |
| image3opt | IMAGE | Third image input for multi-image VLMs. Not all VLMs support multiple images. | |
| image4opt | IMAGE | Fourth image input for multi-image VLMs. Not all VLMs support multiple images. | |
| draft_model_selectionopt | COMBO | -- Custom (enter below) -- | Optional draft model for speculative decoding (faster inference). Select 'Custom' and leave empty to disable. |
| custom_draft_modelopt | STRING | Manual draft model identifier. Only used when draft 'Custom' is selected. Leave empty to disable. | |
| top_popt | FLOAT | 1.000–1 | Nucleus sampling: only consider tokens within cumulative probability top_p (default 1.0 = disabled). Lowering (e.g. 0.9-0.95) = more focused/coherent; raising toward 1.0 = more diverse. |
| top_kopt | INT | 00–500 | Top-K sampling: only consider the K most likely tokens (default 0 = disabled). Lowering (e.g. 20-40) = more focused; raising = more diverse. Recommended 20-40 for thinking models. |
| repeat_penaltyopt | FLOAT | 1.000–2 | Penalizes tokens that already appeared, scaled by how often (default 1.0 = disabled). Raising (1.1-1.3) reduces repetition/loops; too high can hurt coherence. Below 1.0 encourages repetition. |
| min_popt | FLOAT | 0.000–1 | Min-P sampling: drop tokens below this fraction of the top token's probability (default 0.0 = disabled). Raising (e.g. 0.05-0.1) = more focused/coherent; lowering toward 0 = more diverse. A modern alternative to top_p. |
| presence_penaltyopt | FLOAT | 0.00-2–2 | Flat penalty on any token already used, encouraging new topics (default 0.0 = disabled). Raising (e.g. 0.3-0.8) reduces repetition / broadens topics; negative values encourage reuse. Distinct from repeat_penalty. Note: LM Studio has no frequency_penalty. |
| enable_thinkingopt | COMBO | Model default | Force thinking/reasoning on hybrid models like Qwen3 without the '/think' prompt hack (default 'Model default' = leave the model's own behavior untouched). 'Enabled' turns thinking on; 'Disabled' turns it off. Pairs with reasoning_mode. Ignored by models/backends that don't support it. |
| reasoning_modeopt | COMBO | Auto-detect (recommended) | How to extract reasoning/thinking from model output. Auto-detect works with DeepSeek, Qwen, QwQ, GLM, GPT-OSS and similar models. Note: Models don't always produce thinking output for simple queries. For Qwen3, add '/think' to your prompt to force thinking mode. |
| custom_open_tagopt | STRING | <think> | Custom opening tag for reasoning extraction. Only used when reasoning_mode is 'Custom tags'. |
| custom_close_tagopt | STRING | </think> | Custom closing tag for reasoning extraction. Only used when reasoning_mode is 'Custom tags'. |
| unload_llmopt | BOOLEAN | true | Unload the LLM from LM Studio after generation. Recommended to free VRAM for image generation. |
| unload_comfy_modelsopt | BOOLEAN | false | Unload ComfyUI models (SD, VAE, etc.) before LLM inference. Frees VRAM for larger LLMs. |
| refresh_modelsopt | BOOLEAN | false | Toggle ON to re-fetch the model list from LM Studio and update the dropdowns instantly. Automatically toggles back off. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| response | STRING | — |
| reasoning | STRING | — |
| troubleshooting | STRING | — |