ComfyUI Node
LMStudio Prompt Ovum
LM Studio Prompt Node with Dynamic Model Management This node connects to LM Studio's local server to generate text using various language models. It supports dynamic model loading/unloading, automatic model management, and various prompt modes. Features: • Multiple prompt modes (prompt, pixelwave, style, descriptor, character, custom) • Dynamic model loading and selection from available models • Automatic model unloading after specified timeout (a hack) • Model list caching between sessions • Wildcard support with {option1|option2} syntax • Custom conversation history support Requirements: • LM Studio running with server enabled • Models downloaded in LM Studio • Server accessible at specified address:port
LMStudio Prompt Ovum
- image
- text
- context
◄input_promptPrompt Text Here►
◄modeprompt►
◄custom_historypath to history.json►
◄server_addresslocalhost►
◄server_port1234►
◄selected_modelNo models available►
◄unload_timeout_seconds0►
◄seed0►
CategoryOvum/LLM
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| input_prompt | STRING | Prompt Text Here | The main prompt text to send to the LM Studio model. Supports wildcard syntax like {option1|option2} for random selection. |
| mode | COMBO | prompt | Prompt processing mode: • prompt: Direct prompt • descriptor: Adds random descriptive words • pixelwave/style/character: Uses predefined conversation templates • custom: Uses custom history file |
| custom_history | STRING | path to history.json | Path to custom conversation history JSON file (only used when mode is set to "custom"). File should contain message history in OpenAI chat format. |
| server_address | STRING | localhost | LM Studio server address (hostname or IP). Default is localhost for local installations. |
| server_port | INT | 12340–65535 | LM Studio server port number. Default is 1234 which is the standard LM Studio server port. |
| selected_model | COMBO | No models available | Choose which model to use for generation. List is automatically populated from LM Studio and cached between sessions. Enable dynamic loading to automatically load the selected model. |
| unload_timeout_seconds | INT | 0 | You MUST have the liquid/lfm2-1.2b model installed for this to work. Automatic model unload timeout in seconds. Set to 0 to disable. When > 0, the model will be automatically unloaded after this many seconds of inactivity to free up memory. |
| seed | INT | 00–18446744073709550000 | Random seed for reproducible generation and wildcard selection. Use 0 for random seed, or set a specific number for consistent results. |
| imageopt | IMAGE | Optional image to include with the prompt. The image will be encoded and sent to the vision-capable LM Studio model along with the text prompt. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |
| context | LLM_CONTEXT | — |