LLM Prompt Enhancer
A prompt polisher that knows your target model
- llm_config
- image
- enhanced_prompt
You know that feeling: you type "a cat" into Wan 2.2 and get five static seconds of nothing, because image-to-video wants motion, camera, and temporal flow, not a noun. LLM Prompt Enhancer is the node that fixes that for you. Feed it a bare-bones idea and a target model, and it hands the work to a real LLM with a system prompt written specifically for that model family. The name undersells it - this isn't fluff-appending, it's translating your prompt into the dialect each model actually wants.
How it works
The node doesn't do any reasoning itself. It takes an llm_config from the pack's LLM Config node, picks a system prompt based on your mode, and sends your prompt to an API (OpenAI-compatible or Google's). Each of the six modes ships with its own heavily-engineered system prompt - the Wan 2.2 Video one, for instance, is a full brief on five-second I2V constraints, camera moves, and "no cuts, no scene changes." The response is returned as enhanced_prompt, with reasoning-model <think> tags stripped automatically.
The modes are where this node earns its keep:
- Wan 2.2 Video - motion, camera, and 5-second temporal structure for I2V
- Qwen Image Edit - precise edit instructions for image-editing models
- Flux - natural-language descriptive paragraphs
- Stable Diffusion - comma-separated tags with quality modifiers
- LTX-2 Video - shot-by-shot prose with camera and audio cues
- Flux 2 Klein - front-loaded, lighting-first novelist prose
The inputs that matter
You must wire in llm_config (from LLM Config), a prompt, and a mode. The interesting parts are optional. image_description lets you paste a text description (say, from a Florence-style captioner) that gets injected as context. image goes one better - it base64-encodes the first image in a batch and sends it to vision-capable models, which is huge for I2V workflows where the model needs to know what's already in the frame. system_prompt_override replaces the built-in system prompt entirely if you want to roll your own brief.
Install and setup
Grab the pack through ComfyUI Manager (search "Latent Astronaut Suite") or:
cd ComfyUI/custom_nodes
git clone https://github.com/latentastronaut/comfyui-latent-astronaut-suite
Then restart ComfyUI. On first start, install.py pulls openai and google-genai, which the LLM nodes need. You also need an API key - this node has no local model option. Configure it upstream in LLM Config (OpenAI, Grok, Google, or a custom OpenAI-compatible endpoint), and prefer the $ENV.VAR_NAME key syntax over pasting a raw key into the workflow, which can leak into saved metadata.
Where people get burned
The most common mistake is expecting this to run locally. It doesn't - no key, no output. Also, the image input only helps if your configured model is vision-capable; feeding an image to a text-only model just wastes tokens or errors out. And "enhanced" isn't "longer": the SD mode keeps things under 100 words by design, so don't judge it by word count.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| llm_config | LLM_CONFIG | LLM configuration from LLM Config node | |
| prompt | STRING | The prompt to enhance | |
| mode | COMBO | Wan 2.2 Video | Enhancement mode/style |
| system_prompt_overrideopt | STRING | Custom system prompt (replaces default) | |
| image_descriptionopt | STRING | Image description for context (e.g., from Florence) | |
| imageopt | IMAGE | Optional image for vision-capable models (uses first image from batch) |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| enhanced_prompt | STRING | — |