LMStudio Prompt Ovum
LM Studio Prompt Ovum — a local LLM in your ComfyUI graph, no API keys
- image
- text
- context
LMStudioPromptOvum is a full client for LM Studio's local server tucked inside a single ComfyUI node. Wire it up, and you can have a local LLM rewrite your prompt, describe an image, or generate true/false answers mid-workflow - all through the standard OpenAI-compatible endpoint, with no cloud account and no API key.
The appeal is obvious once you've wrestled with prompt chains by hand: instead of hardcoding prompt variations, a local model can generate them for you. And because LM Studio runs everything on your own machine, there's no cost spiral and no data leaving the box. The name is not a lie about needing a server - you do need LM Studio running with its server enabled - but it's a lie about effort: no key, no registration, just a local process.
What it needs before anything works
Three things, all from the node's own description and the README:
- LM Studio running with the local server enabled (Settings → Developer → Server), listening on
localhost:1234by default. - Models downloaded inside LM Studio. The
selected_modelcombo is auto-populated from whatever LM Studio reports, and that list is cached between sessions. - For auto-unload specifically: install the tiny model
liquid/lfm2-1.2band set LM Studio's automatic model unloading to its shortest period (60 seconds). This is a documented quirk, not optional: LM Studio doesn't support unloading a model on request, so the node does a "hack" - it swaps to the tiny model to free VRAM. If you don't need auto-unload, setunload_timeout_secondsto 0 and skip this.
The inputs that matter
input_prompt- the main prompt (multiline). Supports wildcard syntax{option1|option2}for random selection.mode- how to process the prompt:prompt(direct),descriptor(adds random descriptive words),pixelwave/style/character(predefined conversation templates),custom(usescustom_history), plusnoneandtrue-or-false.server_address/server_port- defaultslocalhost/1234.selected_model- which downloaded model to use; enable dynamic loading and it'll be loaded on demand.seed- 0 for random, or a fixed number for reproducible output and reproducible wildcard picks.unload_timeout_seconds- auto-unload after this many seconds of inactivity (0 disables). Requires theliquid/lfm2-1.2bmodel as above.image(optional) - attach anIMAGEand it's encoded and sent along, so vision-capable models can describe or evaluate it.
Two outputs: text (STRING, the model's reply) and context (LLM_CONTEXT, a chat-history bundle you feed to LMStudioPromptChainOvum to keep a conversation going).
Where you'll use it
The canonical setup: generate a prompt, feed text into your CLIP text encoder, and let the local model riff on themes or styles per run. The descriptor and pixelwave modes are clearly tuned for that. Add an image and you've got automatic image captioning/description in the loop. The true-or-false mode is a cheap way to build a conditional branch on a yes/no question - wire the reply through a compare and route the graph.
Troubleshooting
- "Connection refused" / no response - LM Studio server isn't running, or the port/address don't match. Confirm the server is actually enabled in LM Studio.
selected_modelshows "No models available" - nothing is loaded in LM Studio or the server isn't reporting; load a model first, then refresh.- Auto-unload silently does nothing - check that
liquid/lfm2-1.2bis installed and LM Studio's auto-unload is set short. The README is explicit that both are required. - Community reports (r/StableDiffusion, r/comfyui) confirm the general pattern works well with Qwen3-VL-class models for vision tasks - the flakiest part is always the server, not the node.
Install
The node ships in comfy-ovum:
cd ComfyUI/custom_nodes
git clone https://github.com/sfinktah/comfy-ovum
or ComfyUI Manager → comfy-ovum, restart. Then install LM Studio separately, download models, and enable its server. The pack's Python deps include requests, which is what does the talking to the server - Manager handles it.
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 | — |