Nodes/comfy-ovum/LMStudio Prompt Ovum
ComfyUI Node

LMStudio Prompt Ovum

LM Studio Prompt Ovum — a local LLM in your ComfyUI graph, no API keys

By sfinktah·Created about a year ago·Updated 10 months ago· 7
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

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:

  1. LM Studio running with the local server enabled (Settings → Developer → Server), listening on localhost:1234 by default.
  2. Models downloaded inside LM Studio. The selected_model combo is auto-populated from whatever LM Studio reports, and that list is cached between sessions.
  3. For auto-unload specifically: install the tiny model liquid/lfm2-1.2b and 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, set unload_timeout_seconds to 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 (uses custom_history), plus none and true-or-false.
  • server_address / server_port - defaults localhost / 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 the liquid/lfm2-1.2b model as above.
  • image (optional) - attach an IMAGE and 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_model shows "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.2b is 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.

CategoryOvum/LLM

Inputs (9)

NameTypeDefaultDescription
input_promptSTRINGPrompt Text HereThe main prompt text to send to the LM Studio model. Supports wildcard syntax like {option1|option2} for random selection.
modeCOMBOpromptPrompt processing mode: • prompt: Direct prompt • descriptor: Adds random descriptive words • pixelwave/style/character: Uses predefined conversation templates • custom: Uses custom history file
custom_historySTRINGpath to history.jsonPath to custom conversation history JSON file (only used when mode is set to "custom"). File should contain message history in OpenAI chat format.
server_addressSTRINGlocalhostLM Studio server address (hostname or IP). Default is localhost for local installations.
server_portINT12340–65535LM Studio server port number. Default is 1234 which is the standard LM Studio server port.
selected_modelCOMBONo models availableChoose 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_secondsINT0You 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.
seedINT00–18446744073709550000Random seed for reproducible generation and wildcard selection. Use 0 for random seed, or set a specific number for consistent results.
imageoptIMAGEOptional 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)

NameTypeDescription
textSTRING
contextLLM_CONTEXT