New node that modifies prompts based on Z-Image structure:
- Takes input prompt and LLM model
- 6 section instruction inputs: subject, clothing, pose, environment, lighting, camera
- Two processing modes: Single Pass (faster) and Section by Section (precise)
- Temperature control for LLM creativity
- Optional Instagram caption generation (3 styles)
- Text-only LLM calls (no image required)
Phase 1 implementation using LLM API.
Phase 2 will add SID_LLM_Local_Text support.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Caption Generation:
- Added generate_caption toggle to SID_PromptGenerator
- New caption output with 3 styles: Poetic, Technical, Personal
- Each style includes caption, description, and hashtags
- Uses same LLM as prompt generation
Node Colors:
- Added web/js/sid_node_colors.js for yellow node theming
- All SID_ nodes now display with standard ComfyUI yellow swatch
- Added WEB_DIRECTORY export to load JS extensions
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Major Features:
- New modular prompt generator architecture (core/prompt_generator/)
- 15+ taggers/analyzers: WD14, PixAI, JoyTag, NudeNet, Places365, etc.
- Decision engine for intelligent prompt construction
- Template-based prompt building with dynamic sections
Standard Mode Enhancements:
- Tag injection for unmapped high-confidence tags
- Scene-specific prompts (20 scene groups from Places365)
- Animal-specific prompts (20+ animal types)
- Clothing-specific prompts (30+ clothing types)
- Tag-driven detail enhancements (40+ tag mappings)
- Semantic inclusion analysis using sentence-transformers
Detailed Mode (API with reasoning):
- 3-pass LLM generation with full enhancements
- Falls back to Standard mode for local models
- Comprehensive metadata with pass-by-pass details
Removed:
- Extreme mode (consolidated into Detailed mode)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Delete SID_GGUF_LLM node and related files
- Remove llm_providers/sid_gguf_llm.py
- Remove prompt_templates/local_gguf_template.py
- Remove sample_workflows/sample_workflow_gguf.json
- Remove GGUF provider from generator nodes
- Simplify template_factory.py to use Claude template for all providers
- Update pyproject.toml keywords
- QwenVL is now the recommended local LLM provider
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Adds new QwenVL provider as alternative to GGUF:
- Uses HuggingFace transformers with BitsAndBytes quantization
- No llama-cpp-python required (easier cross-platform installation)
- Supports Qwen3-VL (2B/4B/8B) and Qwen2.5-VL (3B/7B) models
- Auto-downloads models from HuggingFace on first use
- Model caching option to keep loaded between runs
Changes:
- New llm_providers/sid_qwenvl_llm.py with QwenVLClient class
- Mark SID_GGUF_LLM as deprecated in favor of QwenVL
- Add qwenvl provider routing in generator _get_client
- Update template_factory.py for qwenvl provider
- Add transformers and accelerate to dependencies
- bitsandbytes as optional dependency for quantization
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Delete sid_zimage_prompt_generator_advanced.py (replaced by V2)
- Update __init__.py to only register V2 component-based analyzer
- Keep only SID_ZImagePromptGenerator_Advanced_V2 for production use
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add prompt_components.py: Iterative flow with 8 components (framing, ethnicity, hair, face, eyes, body_pose, clothing, lighting)
- Add sid_zimage_prompt_generator_advanced_v2.py: Agentic flow with same components
- Fix: Added prompt_description field to framing and ethnicity schemas
- All components now consistently output prompt_description for SD prompt generation
- Tested on multiple image sets with 100% success rate, 0 parse errors, 0 empty fields
- Add iterative_improve.py: CLI tool for batch testing and prompt optimization
- Add .env.example for API key configuration
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove stdout/stderr suppression to show download progress
- Add sys.stdout.flush() for immediate output
- Add --progress-bar on flag for pip
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Detect GPU type: NVIDIA CUDA, Apple Silicon Metal, AMD ROCm, CPU
- Auto-install correct llama-cpp-python wheel/build
- Support Windows, Linux, and macOS
- Update welcome message to show GPU type
- Update README to reflect auto-installation
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add SID_OpenAI_Compatible_LLM for OpenAI/GPT/Together AI/LM Studio
- Add SID_Grok_LLM for xAI Grok API
- Add SID_GGUF_LLM for local GGUF models (Moondream, LLaVA, MiniCPM-V)
- Add LocalGGUFClient wrapper with OpenAI-compatible interface
- Add auto-download support for GGUF models
- Update Advanced node to support all new providers
- Add welcome message with dependency status on load
- Auto-install required dependencies (anthropic, openai, pyyaml, requests)
- Show llama-cpp-python installation instructions for GGUF support
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Create web/js/sid_llm_widget_control.js
- Disables ai_provider, api_key, model, api_url, max_tokens, temperature
when external LLM_MODEL is connected to SID_ZImagePromptGenerator
- Re-enables widgets when LLM_MODEL is disconnected
- Add WEB_DIRECTORY to __init__.py for ComfyUI to load JS
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Delete sid_ai_prompt_generator.py
- Update __init__.py to only register SID_ZImagePromptGenerator
- Simplify node list and startup message
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
FIXES:
1. Color Style Not Applied (CRITICAL BUG FIX)
- Completely rewrote color style enforcement mechanism
- Added explicit comma-separated term mappings for each color style
- Implemented ⚠️ CRITICAL warnings with MANDATORY requirements
- Added contradictory term exclusions (B&W forbids "color", Color forbids "monochrome")
- Color terms now MUST appear first in prompt sequence
- Example: "Black and White" → "black and white photography, monochrome, grayscale, B&W, no color"
2. Model Input Connection Support
- Added force_input=False to target_model parameter
- Can now connect model name from model loader nodes
- Maintains ability to type model name manually
- Updated tooltip to clarify dual functionality
3. Enhanced Model Detection Patterns
- SDXL: +9 patterns (pony, animagine, realvis xl, zavychroma, duchaiten, dreamshaper xl, crystal clear, hellonijicute, counterfeit xl)
- SD 1.5: +7 patterns (deliberate, epicrealism, cyberrealistic, majicmix, chilloutmix, revanimated, absolutereality, analog madness, perfect world)
- More comprehensive automatic model type detection
CLARIFICATIONS:
- Model Research Methodology
* Updated docstring to clarify using pattern matching (not live web search)
* Added note about future CivitAI/HuggingFace API integration
* Changed research_source from "inference" to "pattern_matching"
* Explained that real-time API calls require external dependencies
Technical Details:
- Color style system now provides exact comma-separated terms to use
- Enforcement changed from "include as PRIMARY term" to "Start with EXACT terms: X, Y, Z"
- Added explicit prohibition against contradictory terms
- Model detection now covers 30+ popular model names across all types
Why These Fixes:
User reported color style (B&W) not being applied even when selected. Root cause was insufficient enforcement in system prompt. New approach uses explicit term lists and critical warnings to Claude, ensuring compliance.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
MAJOR UPDATE: Transformed into an intelligent prompting agent that automatically researches models and provides tailored recommendations.
🚀 NEW FEATURES:
- Intelligent Model Research Agent
* Automatically detects model type from name (FLUX/SDXL/SD 1.5)
* Infers model characteristics and capabilities
* Prepared for CivitAI and HuggingFace MCP integration
* Tailors all prompt generation based on research
- Sampler Configuration Output (3rd output)
* Auto-generates optimal sampler settings per model
* Markdown-formatted with pretty tables
* Includes: sampler, steps, CFG scale, clip_skip, etc.
* Model-specific guidance and recommendations
- Dynamic Model Input
* Changed from dropdown to text input
* Accepts ANY model name (FLUX.1-dev, juggernaut_reborn, etc.)
* Agent intelligently adapts to any model
BREAKING CHANGES:
- Output names simplified:
* positive_prompt → positive
* negative_prompt → negative
* NEW: sampler_config (3rd output)
- Target model parameter:
* Was: Dropdown (FLUX, SDXL, SD 1.5, Universal)
* Now: Text input accepting any model name
* Agent automatically detects and optimizes
Implementation Details:
- New _research_model() function (lines 305-428)
* Pattern matching for model type detection
* Returns comprehensive model_info dict
* Includes characteristics, token limits, sampler settings
- New _generate_sampler_config() function (lines 781-826)
* Generates markdown with settings table
* Provides model-specific guidance
* Pretty formatting for easy reading
- Updated _build_system_prompt()
* Now receives model_info dict instead of string
* Incorporates model characteristics into prompts
* Adjusts token limits based on detected type
- Enhanced Console Logging
* Shows complete model research results
* Displays detected type, base model, characteristics
* Outputs sampler configuration recommendations
Why This Update:
Users need prompts optimized for their SPECIFIC model, not just generic types. This intelligent agent researches the actual model being used and tailors everything accordingly. The sampler config output provides actionable recommendations that can be immediately applied in ComfyUI workflows.
Ready for Future Enhancement:
- MCP integration points prepared for CivitAI search
- MCP integration points prepared for HuggingFace search
- Can be enhanced with live API lookups when MCPs configured
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
BREAKING CHANGE: Complete rewrite of prompt generation system to output clean comma-separated prompts instead of markdown-formatted text. This addresses the core issue where markdown formatting doesn't work with image generation models.
Key Changes:
- Comma-separated single-line output format (no markdown, no sections)
- Token limit management per model based on research:
* FLUX: 200-256 optimal (max 512), concise negatives (30-50)
* SDXL: 27-75 optimal (max 75), moderate negatives (40-60)
* SD 1.5: 50-75 optimal (max 75), comprehensive negatives (75-100)
* Universal: 100-120 optimal, balanced negatives (50-70)
- Priority-based prompt sequencing:
* Priority 1: Style requirements (color, photographer, lighting)
* Priority 2: Subject description
* Priority 3: Technical details
* Priority 4: Quality terms
- Streamlined system prompts (850 lines → 653 lines)
- Model-specific negative prompt strategies
- User instructions and style requirements now appear FIRST in prompts
Technical Implementation:
- Rewrote _build_system_prompt() function completely
- Added explicit token limit guidance to Claude
- Implemented priority sequencing system
- Maintained all existing parameters and features
- Preserved photographer and lighting descriptions
- Enhanced model-specific optimization instructions
Why This Update:
Previous versions generated markdown-formatted prompts with section headers and bullet points. These don't work properly with FLUX/SDXL/SD 1.5 models which expect comma-separated keyword lists. This major rewrite ensures proper prompt format and token length for each model type.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Fixed issue where seed parameter was not rendering correctly as a proper integer input with randomization controls. Added control_after_generate=True parameter which enables the standard ComfyUI seed widget with increment/decrement/randomize buttons. Also cleared Python cache to ensure clean node definition loading.
Changes:
- Added control_after_generate=True to seed Int.Input
- Cleared __pycache__ directory for clean reload
- Updated version to 1.3.4
- Added changelog entry for bugfix
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Fixed validation error that occurred when loading workflows saved before seed, lighting_condition, color_style, and photographer_style parameters were added. Added None value handling in execute function to provide safe defaults when these parameters are missing from older workflows.
Changes:
- Added None checks for seed (defaults to 0), lighting_condition, color_style, and photographer_style (default to "None")
- Updated version to 1.3.3
- Added changelog entry for bugfix
- Ensures old workflows continue to work seamlessly
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Fixed issue where seed parameter was showing "nan" in the ComfyUI interface. Changed the max value from 0xffffffffffffffff (64-bit max) to 2147483647 (standard 32-bit signed int max), which is the standard approach used in ComfyUI nodes.
Changes:
- Updated seed max value to 2147483647
- Updated version to 1.3.2
- Added changelog entry for bugfix
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Added comprehensive lighting_condition dropdown with 31 options across 4 categories (Studio Lighting, Studio Techniques, Outdoor/Natural, Special/Creative). Each lighting type includes detailed characteristics for light source, quality, direction, color temperature, shadows, and mood. Updated system prompts to incorporate lighting conditions into positive prompt generation.
Changes:
- Added lighting_condition parameter with 31 lighting options
- Updated execute function signature and system prompt builder
- Created lighting_descriptions dictionary with detailed specs
- Updated docstring and version to 1.3.1
- Updated README with lighting condition documentation
- Added changelog entry for v1.3.1
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
NEW FEATURES:
- Color Style dropdown with 9 options (None, B&W, Color, Monochrome, Sepia, Cross-Processed, High Contrast B&W, Low Key, High Key)
- Photographer Style dropdown with 20 famous photographers (Helmut Newton, Peter Lindbergh, Annie Leibovitz, Richard Avedon, Irving Penn, Herb Ritts, Mario Testino, Steven Meisel, Patrick Demarchelier, Paolo Roversi, Tim Walker, Ellen von Unwerth, David LaChapelle, Steven Klein, Mert and Marcus, Juergen Teller, Bruce Weber, Terry Richardson, Rankin, Albert Watson)
- Seed parameter for randomization (standard ComfyUI seed system)
IMPROVEMENTS:
- System prompts now incorporate color style requirements
- Each photographer has detailed style descriptions (lighting, composition, post-processing)
- Enhanced console logging (shows color style, photographer style, seed)
- All new features have "None" options for backward compatibility
FILES CHANGED:
- sid_ai_prompt_generator.py: +109 lines (new parameters, photographer descriptions, color style logic)
- __init__.py: Version bump to 1.3.0
- README.md: +35 lines (new features documentation, updated changelog)
Author: Siddhartha Lahiri
🤖 Generated with Claude Code