An LLM-powered prompt expansion node for ComfyUI. Transform simple prompts into detailed, high-quality image generation prompts.
- 🚀 Groq API support (free, super fast)
- 🏠 Ollama support (local, offline)
- 🎬 5 Styles: cinematic, anime, photorealistic, artistic, niji
- 📊 4 Detail Levels: minimal, medium, detailed, extreme
- ✅ Automatic positive & negative prompt generation
- 🔧 Custom instructions support
Search for "Prompt Expander" in ComfyUI Manager and install.
cd ComfyUI/custom_nodes
git clone https://github.com/bozkut/ComfyUI-Prompt-Expander.gitRestart ComfyUI after installation.
- Go to console.groq.com
- Create a free account
- Navigate to API Keys → Create API Key
- Copy and paste the key into the node, or set as environment variable:
Windows (Command Prompt):
setx GROQ_API_KEY "gsk_xxxxxxxxxxxxx"Windows (PowerShell):
[Environment]::SetEnvironmentVariable("GROQ_API_KEY", "gsk_xxxxxxxxxxxxx", "User")Linux/Mac:
export GROQ_API_KEY="gsk_xxxxxxxxxxxxx"# Install Ollama
curl -fsSL https://ollama.com/install.sh | sh
# Download a model
ollama pull llama3.2
# Start Ollama server
ollama serveLocated in: bozkut/AI
| Input | Description |
|---|---|
simple_prompt |
Your basic prompt (e.g., "boy, blonde, driving a car") |
llm_provider |
Choose between groq or ollama |
model |
Select LLM model |
style |
cinematic, anime, photorealistic, artistic, niji |
detail_level |
minimal, medium, detailed, extreme |
groq_api_key |
Your Groq API key (optional if using env variable) |
custom_instructions |
Additional instructions for the LLM (optional) |
negative_prompt_request |
Generate negative prompt (true/false) |
| Output | Description |
|---|---|
positive_prompt |
Expanded detailed prompt |
negative_prompt |
Generated negative prompt |
Input:
boy, blonde, driving a car in San Francisco
Output (cinematic, detailed):
A young blonde-haired man behind the wheel of a classic convertible,
golden hour sunlight streaming through the windshield, the iconic
Golden Gate Bridge visible in the distant background, warm amber and
teal color grading, shallow depth of field with bokeh lights,
cinematic composition, lens flare, 8k resolution, photorealistic
skin texture, wind-swept hair, California coastal atmosphere,
dramatic lighting, movie still quality
┌─────────────────────┐
│ 🎨 Prompt Expander │
│ "simple prompt" │
└──┬──────────────┬───┘
│ │
▼ ▼
┌────────┐ ┌────────┐
│positive│ │negative│
│ prompt │ │ prompt │
└───┬────┘ └───┬────┘
│ │
▼ ▼
┌────────┐ ┌────────┐
│ShowText│ │ShowText│ (optional - to preview)
└───┬────┘ └────────┘
│
▼
┌─────────────────────┐
│ Image Generator │
│ (Z Image, SDXL..) │
└─────────────────────┘
workflow_z_image_turbo.json- Ready-to-use workflow with Z Image Turbo
- ComfyUI
- Python 3.10+
requestslibrary (usually pre-installed)
- ComfyUI-Custom-Scripts - For ShowText node
Pull requests are welcome! Feel free to:
- Report bugs
- Suggest new features
- Add new styles or LLM providers
MIT License - see LICENSE for details.
Created by Bora Ozkut
⭐ If you find this useful, please consider giving it a star!