- Add class-level cache dictionary to store prompt/caption results
- Add _build_cache_key() method that hashes image data + all parameters
- Use sampled pixels for efficient image hashing of large images
- Return cached results when seed and all inputs match
- Print cache hit/miss messages for debugging
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add class-level cache dictionary for prompt/caption results
- Build cache key from all inputs (prompt, seed, mode, instructions, presets, model)
- Return cached results immediately if cache hit (no LLM call)
- Store results in cache after generation
- Changing seed will bypass cache and regenerate
- Same seed + same inputs = instant cached result
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add "Expand" as new processing mode option (before Single Pass, Section by Section)
- Create _expand_prompt method that generates detailed prompts from basic text
- Expansion follows Z-Image structure: subject, clothing, pose, environment, lighting, camera
- Photography templates, effects, and styles are incorporated during expansion
- After expansion, any section instructions are applied as modifications
- Useful for creating detailed prompts without a source image
Usage: Set processing_mode to "Expand", enter basic text like "woman in red dress, beach sunset"
The LLM will generate a comprehensive 200-400 word detailed prompt.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove hard word count limits (was 800 words) from all local clients
- Truncation now only occurs for actual repetition patterns
- Increase min tokens to 1500 and default max to 6000 for prompt modification
- Add token calculation logging for debugging
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Interrupt Handling:
- Add check_interrupt() using ComfyUI's throw_exception_if_processing_interrupted
- Nodes now properly stop when user clicks cancel button
Token/Word Limits (prevent truncation):
- Increase word limits from 400-500 to 800 words in all local clients
- Increase token buffer from 30% to 50% in PromptModifier
- Increase min tokens from 500 to 800 for prompt modification
- Increase default max_tokens from 2000 to 4000
PromptModifier Analysis Report:
- Add console report comparing original vs modified prompts
- Show word count changes and semantic differences
- Verify if requested modifications were applied
PromptGenerator:
- Remove prompt_metadata from outputs (was 3rd output)
- Save metadata to logs/prompt_generator/ folder
- Add logs/ to .gitignore
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Filter out <think>...</think> reasoning blocks from Qwen3 output
- Handle incomplete think blocks (model didn't close tag)
- Add seed field to SID_PromptGenerator and SID_PromptModifier
- Add dynamic max_tokens calculation based on input size + 30%
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add seed input to SID_PromptGenerator and SID_PromptModifier
for reproducibility (change seed to force re-generation)
- Add dynamic max_tokens calculation in PromptModifier:
- Estimates tokens from input prompt length
- Adds 30% buffer for modifications
- Clamps between 500 and model's max_tokens
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add repetition_penalty (1.2-1.3) and top_p params to all local model clients
- Add _truncate_runaway() to detect and cut off repetitive output:
- Character repetition (10+ same chars)
- Phrase repetition (5+ consecutive n-grams)
- Hard word limit safety net (400-500 words)
- Pass repetition_penalty/top_p from extra_params in all mode files
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Added release_vram boolean toggle (default True)
- Clears GPU memory and runs garbage collection after execution
- Frees VRAM for subsequent nodes in workflow
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
New dropdown options:
- Photography Templates (16): Studio Portrait, Fashion Editorial, Boudoir, Cinematic, etc.
- Photography Effects (18): Film Grain, Bokeh, Teal and Orange, Black and White, etc.
- Photographer Styles (20): Annie Leibovitz, Peter Lindbergh, Helmut Newton, etc.
Presets are integrated naturally with section modifications.
Single Pass applies all at once, Section by Section applies presets first then sections.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Removed temperature parameter from SID_PromptModifier
- Now uses temperature from connected LLM node (llm_model.temperature)
- Changed prompt input to forceInput (connection only, no text box)
- Added .cache/ and .claude/ to .gitignore
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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>
Changed final instruction from "Be comprehensive and precise" to
"Write as a single flowing paragraph. Be precise and literal."
for consistency across all modes.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Fashion poses detected:
- Contrapposto (S-curve)
- Hand on hip
- Power pose (wide stance)
- Crossed legs
- Walking/runway
- Over shoulder look
- Leaning
- Arms crossed
- Weight shift
- Hands behind back
Body/face orientation:
- Facing camera vs side vs angled (3/4 view)
- Body turn direction (left/right)
- Face turn direction (looking left/right)
- Back to camera detection
Integration:
- Fashion poses extracted from DWPose keypoints
- Pose info injected into LLM prompts
- Detailed pose output in runner console
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix DWPose/OpenPose to extract actual keypoints instead of just "detected: True"
- Improve pose analysis with better standing/sitting/lying/kneeling detection
- Add arm position detection (raised, extended, neutral)
- Add hand near face detection
- Track visible body parts (shoulders, hips, knees, ankles)
- Better pose type confidence scoring
- Enhanced pose output in runner with detailed keypoint info
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Changes:
- Update system prompts for Z-Image/Flux with concrete visual descriptions
- Add CRITICAL RULES to exclude poetic/philosophical/abstract language
- Add female anatomy tags injection for women subjects (NudeNet workaround)
- Remove reasoning requirement from detailed mode - works on all LLMs now
- Detailed mode uses extended thinking only when available (Anthropic API)
- Fix Decisions attribute names (wildlife_type, weather_condition, landmark_name)
- Fix get_tag_enhancement/get_clothing_prompt function signatures
- Fix NudeNet detection display (class/score vs label/confidence keys)
- Add local model support to detailed mode
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Changes:
- Use llm_model.max_tokens instead of hardcoded 8000/4000 in detailed.py
- Add max_injected_tags node input (default 30, range 5-100)
- Remove enhancement limits (was [:3] per section, [:5] clothing)
- Remove Extreme mode from analysis_mode options
- Pass tag_threshold and max_injected_tags through entire pipeline
🤖 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>