EBU LMStudio Make Request
Turn a rough idea into a full prompt using a local LLM
- generated_text
This is the workhorse node in the pack, and its default settings already tell you exactly what it's for. Look at the system_message it ships with - "You are an assistant designed to craft AI image prompts... Respond with just your new prompt" - and you've got the whole idea: you type a rough concept into prompt, a locally-running LLM fleshes it out into something detailed and specific, and you wire the result straight into your conditioning node. No cloud API, no key, no per-call cost. Just whatever model you've already got sitting in LM Studio.
That framing matters more in 2026 than it would have a couple years back. A growing share of image models - Flux, Z-Image, Anima, Krea 2 - are reading your prompt through an LLM text encoder rather than tokenizing it as a bag of CLIP tags, which means they respond to structured natural-language instructions, not (word:1.3) weights or comma-separated booru tags. Asking an LLM to write that kind of prompt for you, in that style, is a genuinely sensible division of labor. And this isn't a hypothetical pairing - people are already running exactly this pattern in the wild, pointing a local chat-completions-style node at their own hardware to generate or expand prompts before they ever hit the sampler, no cloud round-trip involved.
What it actually does
Under the hood it's a plain HTTP call to an OpenAI-compatible chat completions endpoint - the same API shape LM Studio, Ollama, and half the local-LLM ecosystem all speak. prompt is your user message, system_message is the instruction that shapes how the model responds to it, and url is where that request goes (default http://127.0.0.1:1234/v1/chat/completions, LM Studio's own local server). Because it's just a generic chat call, you're not locked into prompt-writing - swap the system_message for a captioning instruction, a style critic, whatever, and it'll do that instead. The default text is a starting point, not a constraint.
The knobs worth actually touching: context_length needs to be at or below what the model was loaded with in LM Studio, or you'll get truncated context. temp and top_p are the usual creativity dials - push temp up if every generated prompt is coming back suspiciously similar. max_tokens caps the response length; the default of 300 is plenty for a single image prompt but tight if you're asking for something more elaborate. seed does double duty: it's passed through as the request's sampling seed for reproducibility, and just as importantly it forces ComfyUI to actually re-run the node - without something changing between calls, ComfyUI's output caching will happily hand you back yesterday's cached result instead of hitting the LLM again. utf8_safe_replace is a safety net for local models (especially smaller quantized ones) that occasionally emit a broken multi-byte character - flip it on if you ever see mangled text in the output.
The single output is generated_text - a plain string. Wire it into a CLIPTextEncode, or into a Show Text node first if you want to eyeball what the LLM actually wrote before it hits your sampler.
Installing it
Through ComfyUI Manager: search "EBU LMStudio" and install. Or by hand - cd ComfyUI/custom_nodes && git clone https://github.com/burnsbert/ComfyUI-EBU-LMStudio, then restart ComfyUI. That's the node pack side, and it's genuinely lightweight - no extra pip dependencies beyond what ComfyUI already has.
The real install is on the LM Studio side, and it's separate software you need running alongside ComfyUI: install LM Studio itself, turn on Developer Mode so the local server is available, download at least one LLM inside it, and confirm CLI access works (lms ls --detailed should list what you've got installed - this pack talks to LM Studio through that CLI as well as its HTTP server). Then restart ComfyUI so it picks up the new node.
Where people get burned
Connection-refused errors almost always mean LM Studio isn't running, Developer Mode is off, or the url doesn't match your actual host/port. If the request goes through but errors on "no model loaded," LM Studio has nothing loaded yet - either load one by hand in the app, or chain EbuLMStudioLoadModel in front of this node so a model is guaranteed to be ready first. And because this node is talking to whatever's local, its output quality is entirely a function of which model you loaded - a small 7-8B local model writing image prompts is not going to match GPT-4-class output, so if the generated prompts feel flat, that's the model, not this node.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | — | |
| system_message | STRING | You are an assistant designed to craft AI image prompts for an AI image generator that uses natural language prompts. Follow the instructions you are given, or use the guidelines, to create a detailed prompt that includes creativity and amazing visual details for an unforgetable image. Respond with just your new prompt. | — |
| url | STRING | http://127.0.0.1:1234/v1/chat/completions | — |
| context_length | INT | 4096512–65536 | — |
| seed | INT | 00–18446744073709550000 | — |
| max_tokens | INT | 30010–100000 | — |
| temp | FLOAT | 0.700–1 | — |
| top_p | FLOAT | 0.950–1 | — |
| utf8_safe_replace | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| generated_text | STRING | — |