LM Studio Prompt (Mikey)
LM Studio Prompt (Mikey Nodes) — let a local LLM write your prompt for you
- text
Staring at a blank prompt box is its own kind of writer's block. This node hands the job to a language model running on your own machine: type a rough idea, pick a mode, and it comes back with expanded, generation-ready prompt text - no cloud API, no key, nothing leaving your computer.
What it's actually talking to
LM Studio is a desktop app for running local LLMs with a built-in server that speaks the same API shape as OpenAI's chat endpoint. This node is a client for that server, nothing more - it doesn't ship a model or run inference itself. You need LM Studio installed separately, a model loaded in it, and its local server switched on before this node has anything to talk to. The server_address/server_port defaults (localhost / 1234) match LM Studio's own default local server settings, so if you haven't changed anything on the LM Studio side, you shouldn't need to touch these fields either.
The inputs that matter
input_prompt- your rough idea, a few words or a full sentence. This is what gets sent to the LLM as the seed of its response.mode- six presets:prompt,pixelwave,style,descriptor,character,custom. Each of the first five almost certainly maps to a different built-in system prompt that steers the LLM toward a different kind of output (general prompt expansion versus a style description versus a character description, for instance) - the pack doesn't document the exact wording of each preset, so the fastest way to learn what each mode actually produces is to run your sameinput_promptthrough all five and compare.custom_history- only relevant whenmodeiscustom. Point it at a JSON file with your own conversation history/system prompt, which lets you fully replace the built-in presets with your own instructions to the model.seed- almost certainly forwarded to the LLM's own sampling, giving you reproducible outputs for the same input at the same seed, the same way an image seed works.
Output is one text STRING - wire it straight into a CLIP Text Encode node, or into another Mikey text node (Wildcard Processor, LoraSyntaxProcessor) if you want the LLM's output to still resolve wildcards or <lora:> tags afterward.
Installing
The node comes with the full Mikey Nodes pack - ComfyUI Manager, search "Mikey Nodes," install, restart, or git clone https://github.com/bash-j/mikey_nodes into custom_nodes manually. The pack itself needs nothing extra for this node to load. What you actually need to set up separately is LM Studio: download it, load a model that's reasonably good at instruction-following, and turn on its local server (usually a toggle in LM Studio's own UI, listening on port 1234 by default).
Where it breaks
- Connection refused / timeout. By far the most likely failure: LM Studio's server isn't running, or you loaded a model but forgot to start the server toggle. Check LM Studio's own window before touching this node's settings.
- Empty or garbled text output. If the connection works but the output looks wrong, the model loaded in LM Studio may not be instruction-tuned enough to follow the preset's system prompt well - smaller or base (non-chat) models tend to produce worse results here than a proper chat/instruct model.
<think>tags leaking into your prompt. If you're running a reasoning-style local model, its raw response may include its internal reasoning wrapped in<think>...</think>before the actual answer. The pack ships a separate Remove Text Between node specifically for stripping that kind of tag out - chain it after this node if you notice think-block text bleeding into your CLIP encode.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| input_prompt | STRING | Prompt Text Here | — |
| mode | COMBO | prompt | 6 options: prompt, pixelwave, style, descriptor, character, custom |
| custom_history | STRING | path to history.json | — |
| server_address | STRING | localhost | — |
| server_port | INT | 12340–65535 | — |
| seed | INT | 00–18446744073709550000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |