ComfyUI Extension: Eric's Prompt Enhancers for ComfyUI
A comprehensive suite of AI-powered prompt enhancement nodes for ComfyUI using local LLMs (LM Studio or Ollama). Transform simple prompts into detailed, platform-optimized descriptions for video and image generation.
Custom Nodes (0)
README
Eric's Prompt Enhancers for ComfyUI
A comprehensive suite of 5 AI-powered prompt enhancement nodes for ComfyUI using local LLMs (LM Studio or Ollama). Transform simple prompts into detailed, platform-optimized descriptions for video and image generation.
📦 Quick Start
cd ComfyUI/custom_nodes/
git clone https://github.com/EricRollei/Local_LLM_Prompt_Enhancer.git video_prompter
cd video_prompter
pip install -r requirements.txt
Restart ComfyUI. All nodes will appear under: Add Node → Eric Prompt Enhancers
🎯 The 5 Nodes
Find all nodes under the "Eric Prompt Enhancers" category in ComfyUI.
1. 🎬 Video Prompt Expander
Simple video prompt expansion with style presets.
- 4 Detail Levels: Concise, Moderate, Detailed, Exhaustive
- 6 Style Presets: Cinematic, Surreal, Action, Stylized, Noir, Random
- Auto-Variation: Generate up to 3 unique variations
- Best for: Quick video prompt expansion from short ideas
2. 🎬 Video Prompt Expander (Advanced) ⭐ NEW v1.8
Granular control over video aesthetics with 50+ detailed settings.
NEW in v1.8:
- 4 Operation Modes:
expand_from_idea- Expand short conceptsrefine_existing- Polish existing promptsmodify_style- Change aesthetic while keeping subjectadd_details- Enrich existing prompts
- Clear Detail Levels: Concise, Moderate, Detailed, Exhaustive (with tooltips!)
- Optional Image Input: Analyze images with Qwen3-VL for image-to-video workflows
- Auto Mode Detection: Automatically switches to image-to-video when image provided
Controls:
- Lighting: Light source (10 options), Lighting type (13 options), Time of day (9 options)
- Camera: Shot size (10 options), Composition (8 options), Lens (6 options), Angle (10 options), Movement (17 options)
- Visual: Color tone (7 options), Visual style (15 options), Visual effects (11 options)
- Character: Emotion (13 options)
Best for: Professional video generation with precise aesthetic control
3. 🖼️➡️🎬 Image-to-Video Prompt Expander
Vision model analyzes images and adds motion descriptions for video generation.
- Automatic Scene Understanding: Qwen3-VL vision analysis
- Motion Description Generation: AI-generated movement and action
- Style Integration: Combines visual analysis with expansion tiers
- Best for: Converting static images into video prompts
4. 🖼️➡️🖼️ Image-to-Image Prompt Expander
Platform-aware image-to-image prompt generation.
- 5 Platforms: Flux Redux, SDXL Img2Img, Hunyuan Img2Img, Qwen Edit, Wan Edit
- Transformation Controls: Style transfer, detail level, creativity settings
- Vision Analysis: Understands source image characteristics
- Best for: Image transformation and editing workflows
5. 📝➡️🖼️ Text-to-Image Prompt Enhancer (v1.7)
Advanced multi-platform image prompt enhancement with extensive creative controls.
- 8 Platforms: Flux, SDXL, Pony Diffusion, Illustrious XL, Chroma, Qwen Image, Qwen Edit, Wan Image
- Reference Images: Optional 1-2 image inputs with visual analysis
- Genre Styles: 22 styles (cinematic, horror, cyberpunk, steampunk, noir, fantasy, etc.)
- Prompt Length: 6 options (very_short to very_long, 20-400 tokens)
- Subject Controls: Framing (14 options), Pose (17 options)
- Advanced Settings: Camera angle, composition, lighting (source/quality), weather, time, color mood
- Special Syntax: Emphasis
(keyword:1.5)and Alternation{a|b|c}support - Best for: Professional image generation with platform-specific optimization
✨ Key Features
🤖 Local LLM Support
- LM Studio: OpenAI-compatible API (recommended)
- Ollama: Simple CLI-based LLM server
- Qwen3-VL (Optional): Local vision model for image analysis
- Privacy: All processing happens locally, no data sent to cloud
🎨 Platform-Specific Optimization
Each platform has unique requirements and prompting styles:
| Platform | Style | Optimal Length | Specialization | |----------|-------|----------------|----------------| | Flux | Natural language | 75-150 tokens | Photography, artistic | | SDXL | Natural/tags hybrid | 40-75 tokens | Versatile, balanced | | Pony Diffusion | Booru tags | Tag count | Anime, characters | | Illustrious XL | Danbooru tags | Tag count | Detailed anime | | Chroma/Meissonic | Detailed natural | 100-200 tokens | Complex scenes | | Qwen Image | Technical descriptions | Medium | General purpose | | Qwen Edit | Edit instructions | Medium | Image editing | | Wan Image | Cinematography | 60-120 tokens | Professional video stills |
🔧 Special Syntax (NEW v1.6.1)
Emphasis (Weight Control)
(keyword:1.5) # Increase importance 1.5x
(keyword:0.5) # Decrease importance 0.5x
(red hair:2.0) # Double the weight
Alternation (Random Selection)
{cat|dog|rabbit} # Picks one randomly
{red|blue|green} dress # Random color
{elegant|casual} woman with (detailed face:1.5)
Combined
A {tall|short} woman with (dark hair:1.4) wearing a {red|blue|green} (dress:1.2)
🎯 Intelligent Features
- Auto-Detection: Analyzes input complexity and selects optimal detail level (Video nodes)
- Multiple Variations: Generate up to 3 unique variations in one run
- Keyword Integration: Automatically include LoRA triggers and custom terms
- Smart Negatives: Platform-optimized negative prompts
- File Export: Save prompts with complete metadata
- Wildcard Support: Random element selection for variety
🚀 Installation
Prerequisites
- ComfyUI: Installed and working
- Python 3.8+: Usually included with ComfyUI
- LLM Backend: LM Studio or Ollama (see setup below)
Step 1: Install the Node
Method 1: Git Clone (Recommended)
cd ComfyUI/custom_nodes/
git clone https://github.com/EricRollei/Local_LLM_Prompt_Enhancer.git video_prompter
cd video_prompter
pip install -r requirements.txt
Method 2: Manual Install
- Download this repository as ZIP
- Extract to
ComfyUI/custom_nodes/video_prompter/ - Install dependencies:
cd ComfyUI/custom_nodes/video_prompter/ pip install -r requirements.txt
Step 2: Setup LLM Backend
Choose one of these options:
Option 1: LM Studio (Recommended)
- Download from: https://lmstudio.ai/
- Load a model (recommended: Llama 3 8B or similar)
- Start the server (Settings → Server → Start Server)
- Default endpoint:
http://localhost:1234/v1
Option 2: Ollama
- Install from: https://ollama.ai/
- Pull a model:
ollama pull llama3 - Server runs automatically at:
http://localhost:11434
Step 3: Restart ComfyUI
All nodes will appear under: Add Node → Eric Prompt Enhancers
Optional: Qwen3-VL Vision Model
For image analysis in Image-to-Video and Image-to-Image nodes:
pip install transformers>=4.42.0 accelerate>=0.30.0 huggingface_hub>=0.23.0 bitsandbytes>=0.43.0
See VISION_BACKEND_GUIDE.md for details.
📖 Usage Guide
Basic Workflow (Video Prompt Expander)
- Add Node: Right-click → Eric Prompt Enhancers → Video Prompt Expander
- Enter Prompt: "A cat playing piano in a cozy room"
- Select Preset: Choose "cinematic" for film-like quality
- Choose Detail Level: "detailed" for ~400-500 words
- Configure LLM:
- Backend:
lm_studio - Model:
llama3 - Endpoint:
http://localhost:1234/v1
- Backend:
- Generate: Run the workflow
- Use Output: Connect
positive_prompt_1to your video generator
Advanced Workflow (Advanced Node)
- Add Node: Video Prompt Expander (Advanced)
- Choose Operation Mode:
expand_from_idea: For short conceptsrefine_existing: For polishing existing promptsmodify_style: To change aestheticadd_details: To enrich prompts
- Select Detail Level: Choose based on desired output length
- Set Aesthetic Controls: Configure camera, lighting, style, etc.
- Optional: Add reference image for image-to-video mode
- Generate: Prompts incorporate your specific controls
Image-to-Video Workflow
- Add Node: Image-to-Video Prompt Expander (or Advanced with image)
- Connect Image: Link your image to the
reference_imageinput - Add Direction: "Camera slowly zooms in on the subject"
- Generate: Vision model analyzes image and incorporates it into prompt
Text-to-Image Workflow
- Add Node: Text-to-Image Prompt Enhancer
- Select Platform: Choose your target platform (Flux, SDXL, etc.)
- Set Length: Choose prompt length (medium recommended)
- Configure Controls: Set genre, framing, lighting, etc.
- Use Syntax: Add emphasis
(keyword:1.5)and alternations{a|b} - Generate: Get platform-optimized prompts
📝 Detail Levels Explained
Concise (~150-200 words)
- Essential details only
- Clear subject, basic setting, simple action
- Use when: You want compact prompts or API token savings
Moderate (~250-350 words)
- Good balance of detail
- Subject characteristics, environment description, basic aesthetics
- Use when: Standard detailed descriptions needed
Detailed (~400-500 words) - DEFAULT
- Rich, comprehensive description
- Full cinematography, specific lighting, camera work
- Use when: Professional video generation
Exhaustive (~600-1000 words)
- Maximum detail for cinematic quality
- Director-level descriptions, complete technical details
- Use when: Masterful, film-quality output required
🎨 Style Presets
Cinematic
Professional film quality with emphasis on lighting, composition, and smooth camera movements.
- Edge lighting, soft lighting, warm colors
- Professional framing, balanced composition
Surreal
Dreamlike, unusual scenes with artistic emphasis.
- Unexpected combinations, creative camera angles
- Artistic lighting, ethereal atmosphere
Action
High-energy motion and dynamic camera work.
- Fast movement, intense action
- Dynamic angles, motion blur
Stylized
Artistic interpretation with strong visual identity.
- Bold choices, distinctive look
- Creative freedom, unique aesthetics
Noir
Dark, moody film noir aesthetic.
- High contrast, dramatic shadows
- Low-key lighting, mystery atmosphere
Random
AI selects random aesthetic elements while respecting your core concept.
- Variety for batch generation
- Creative combinations
🔧 Configuration
Common Settings
LLM Configuration
llm_backend:lm_studioorollamamodel_name: Your loaded model (e.g., "llama3")api_endpoint: LLM server URLtemperature: 0.1-2.0 (0.7 recommended, lower = focused, higher = creative)
Keywords
positive_keywords: Comma-separated must-include terms (LoRA triggers, style terms)negative_keywords: Comma-separated terms to avoid
Output
num_variations: Generate 1-3 variationssave_to_file: Save prompts to disk with metadatafilename_base: Base name for saved files
Node Outputs
All nodes return:
- positive_prompt_1/2/3: Enhanced prompt variations
- negative_prompt: Auto-generated platform-specific negatives
- breakdown/settings_used: Detailed analysis of what was applied
- status: Success messages, errors, file save location
📚 Documentation
Quick References
- QUICKSTART.md - Get started in 5 minutes
- QUICK_REFERENCE.md - Fast reference guide
- QUICK_REF_V17.md - Text-to-Image quick reference
Node Guides
- TXT2IMG_GUIDE.md - Text-to-Image node complete guide
- IMG2IMG_GUIDE.md - Image-to-Image workflows
- NODE_COMPARISON.md - Which node to use when
- ADVANCED_NODE_REDESIGN.md - Advanced node v1.8 redesign details
Setup Guides
- LM_STUDIO_SETUP.md - LM Studio configuration
- VISION_BACKEND_GUIDE.md - Qwen3-VL setup for image analysis
- CONFIGURATION.md - Advanced configuration options
Platform & Technical
- WAN_GUIDE_REFERENCE.md - Wan 2.2 video prompt guide
- WILDCARD_GUIDE.md - Wildcard syntax examples
Updates & Fixes
- CHANGELOG.md - Complete version history
- UPDATE_V17_ENHANCED_CONTROLS.md - v1.7 features
- BUGFIX_ADVANCED_NODE.md - v1.8 bug fixes
- BUGFIX_V161.md - v1.6.1 syntax fixes
🆕 What's New in v1.8.0
Advanced Prompt Expander Node - Complete Redesign
3 Major Usability Improvements:
-
Operation Modes - Now you can modify existing prompts!
expand_from_idea- Original expansion behaviorrefine_existing- Polish and improve promptsmodify_style- Change aesthetic while keeping subjectadd_details- Add descriptive richness
-
Clear Detail Levels - No more confusing tiers!
- Renamed to: Concise, Moderate, Detailed, Exhaustive
- Added tooltips explaining each option
- Removed confusing "auto" mode
-
Image Input Support - Image-to-video actually works!
- Optional
reference_imageinput - Qwen3-VL vision analysis integration
- Automatic mode detection (text vs image-to-video)
- Status shows when image is being used
- Optional
Bonus: All video nodes now support emphasis (keyword:1.5) and alternation {a|b|c} syntax!
See docs/ADVANCED_NODE_REDESIGN.md for complete details.
💡 Tips & Best Practices
For Best Results
- Start Simple: Begin with basic prompts, let the LLM expand
- Use Presets: They provide consistent, proven aesthetic directions
- Experiment with Temperature: 0.7 is balanced, 0.3-0.5 for consistency, 0.8-1.2 for variety
- Leverage Keywords: Add LoRA triggers and style terms to positive_keywords
- Save Your Prompts: Enable save_to_file to build a library
- Use Variations: Generate 3 variations to pick the best
- Platform Matters: Choose the right platform for your model
Common Workflows
Quick Video Prompt
Node: Video Prompt Expander
Input: "cyberpunk street scene"
Preset: stylized
Detail: moderate
Professional Image Generation
Node: Text-to-Image Enhancer
Platform: Flux
Input: "portrait of a (warrior:1.3) with {red|blue|purple} armor"
Length: long
Genre: fantasy
Refine Existing Prompt
Node: Video Prompt Expander (Advanced)
Operation: refine_existing
Input: [Your existing 300-word prompt]
Detail: detailed
Image-to-Video with Direction
Node: Video Prompt Expander (Advanced)
Reference Image: [Your image]
Input: "Camera slowly dollies in while subject looks up"
Operation: expand_from_idea
🐛 Troubleshooting
LLM Connection Failed
- Check LLM backend is running (LM Studio or Ollama)
- Verify endpoint URL matches your LLM server
- Test in browser: http://localhost:1234/v1 (LM Studio) or http://localhost:11434 (Ollama)
Empty Output
- Check temperature isn't too high (>1.5)
- Verify model is loaded in LLM backend
- Check ComfyUI console for error messages
Emphasis Syntax Not Working
- Make sure you're using parentheses with colon:
(keyword:1.5) - Syntax is preserved in v1.6.1+ for video nodes, v1.7+ for image nodes
Image Analysis Not Working
- Install vision dependencies:
pip install transformers accelerate huggingface_hub bitsandbytes - Check Qwen3-VL model is downloaded
- See VISION_BACKEND_GUIDE.md
🤝 Contributing
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
📄 License
Dual License:
- Non-Commercial: Free for personal/research use
- Commercial: Contact for licensing
See LICENSE for details.
🙏 Acknowledgments
- ComfyUI community for the amazing platform
- LM Studio and Ollama teams for excellent LLM backends
- Qwen3-VL team for the vision model
- All users who provided feedback and bug reports
📞 Support
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Version: 1.8.0
Last Updated: October 24, 2025
Author: Eric Rollei
Repository: https://github.com/EricRollei/Local_LLM_Prompt_Enhancer