Lackluster Prompt Enhancer
Enhance prompts with a local LLM and task-specific templates
- image0
- image1
- image2
- image3
- image4
- enhanced_prompt
- negative_prompt
The name is accurate but understated: this isn't a generic "make my prompt longer" node. Lackluster Prompt Enhancer rewrites a rough idea into a structured generation or editing prompt using task-specific templates, and it expects to talk to a local LLM - Ollama by default, or any OpenAI-compatible endpoint. The task templates come from Bernini's official per-task prompt engineering, which is a nice pedigree: these are the shapes used for video editing, reference-driven generation, and the rest, not a one-size-fits-all "improve this."
How it works
You give it a prompt and pick a task_type - v2v (video-to-video), rv2v (reference-guided video editing), r2v (subject-driven video), t2v (text-to-video), t2i, r2i, i2i, i2v, mv2v, vi2v, ads2v, vrc2v, and more. It picks the matching system prompt and enhancement template, sends your text to the LLM at ollama_url (default http://127.0.0.1:11434), and returns:
- enhanced_prompt (STRING) - the rewritten prompt, ready for your text encoder
- negative_prompt (STRING) - a task-appropriate negative (or yours, if you set negative_prompt)
api_format chooses the wire protocol: Ollama (/api/chat) or OpenAI/vLLM (/v1/chat/completions). If ollama_model is left empty, the node passes the prompt through untouched - useful as a bypass while you wire things up. auto_enhance runs the enhancement on every queue; otherwise you trigger it with the Enhance button.
The multimodal trick: image0 through image4 are optional reference images, converted to base64 and sent to the LLM. Reference them in your prompt text as image0, image1, etc. - "make image0 wear a red coat" style instructions. That only does anything if your model is a VLM, so pick one that is if you're using this path.
The inputs worth caring about
- task_type - the most important choice; it decides the whole template
- ollama_url / ollama_model / api_format - your LLM plumbing
- temperature (0–2), max_tokens, seed - generation params. The tooltips carry a real caveat: GPT-5/o-series and OpenAI/vLLM endpoints ignore
seedand may ignoretemperature - prepend_system_prompt - when True (default) it sticks the task's system prompt in front of the output, which matters because these models treat the output as an instruction - that's what CLIPTextEncode / T5 conditioning wants
Grounded expectations
The KB's take on local prompt enhancers applies here straight: this class of node removes the blank-page problem - it does not add image quality, and an unconstrained enhancer will happily add details you didn't ask for. Keep your instruction scoped and check the output before it hits a long queue. Also, "LLM as a Comfy node" has a security history - this node ships no such baggage, but it is arbitrary Python, so install it from the pack's repo via Manager like everything else.
Install and setup
Manager → "ComfyUI Lackluster Nodes" (requests + numpy deps). Then the real requirement is a running LLM server: Ollama installed and serving a model (ollama pull something in the 8B class is the community sweet spot), or a vLLM endpoint you point at. No LLM in the pack itself - the node is the client.
Inputs (18)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | Raw instruction or generation prompt. Use the Enhance button or enable auto-enhance to rewrite with the task template. | |
| task_type | COMBO | v2v | Bernini task mode. Determines the enhancement template and system prompt used by the LLM. |
| ollama_url | STRING | http://127.0.0.1:11434 | LLM endpoint URL (Ollama or vLLM/OpenAI-compatible). |
| ollama_model | STRING | LLM model name. Leave empty to skip enhancement (pass-through). | |
| api_format | COMBO | Ollama | Ollama uses /api/chat. OpenAI/vLLM uses /v1/chat/completions. |
| auto_enhance | BOOLEAN | false | When enabled, enhances the prompt server-side on every queue. |
| image0opt | IMAGE | Reference image slot 0 = 'image0' in your prompt. Converted to base64 and sent to multimodal LLMs. | |
| image1opt | IMAGE | Reference image slot 1. Use 'image1' in your prompt. | |
| image2opt | IMAGE | Reference image slot 2. Use 'image2' in your prompt. | |
| image3opt | IMAGE | Reference image slot 3. Use 'image3' in your prompt. | |
| image4opt | IMAGE | Reference image slot 4. Use 'image4' in your prompt. | |
| text_inputopt | STRING | Text node connection input. If connected, replaces the prompt field. | |
| negative_promptopt | STRING | Custom negative prompt. Leave empty to use Bernini's default. | |
| temperatureopt | FLOAT | 0.700–2 | LLM temperature. Lower = more deterministic. GPT-5 / o-series models ignore this and use their internal default. |
| max_tokensopt | INT | 204864–8192 | Maximum tokens in the LLM response. |
| seedopt | INT | 00–2147483647 | LLM seed for reproducibility. 0 = random. Ollama only; ignored by OpenAI/vLLM endpoints. |
| prepend_system_promptopt | BOOLEAN | true | Prepend the task system prompt to the enhanced output. Useful for CLIPTextEncode / T5 conditioning. |
| unload_ollamaopt | BOOLEAN | false | Tell Ollama to unload the model from VRAM after enhancement. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| enhanced_prompt | STRING | — |
| negative_prompt | STRING | — |