How adieyal/sd-dynamic-prompts works
Main Components Architecture
a) Core Components:
• Prompt Generator System
• Wildcard Management System
• Template Processing Engine
• Integration Layer with SD Web UI
• Collections Manager
• Configuration Manager
b) External Integrations:
• Magic Prompt Models
• Lexica.art API
• File System (for wildcards)
• Stable Diffusion WebUI
Key Architectural Elements
a) Prompt Generation Pipeline:
Template Input -> Parser -> Wildcard Resolution -> Prompt Generation -> Output Handler
b) Data Flow Systems:
• Wildcard File System
• Configuration System
• Template Processing System
• Model Integration System
Input Layer
• Template Input Interface
• Configuration Interface
• Wildcard Manager Interface
Processing Layer
• Template Parser
• Wildcard Resolver
• Combinatorial Generator
• Magic Prompt Processor
• Attention Grabber
• Jinja2 Template Engine
Integration Layer
• SD WebUI Bridge
• Model Manager
• File System Manager
• API Integration Handler
Output Layer
• Prompt Writer
• PNG Info Saver
• Results Display
Key Relationships to Highlight
• Template processing flow
• Wildcard resolution system
• Integration with SD WebUI
• Model loading and management
• Configuration management
• File system interactions
Technical Details
• Python-based implementation
• Jinja2 template support
• Regular expression processing
• File system operations
• API integrations
• Model management
Implementation Notes
• Modular architecture
• Clear separation of concerns
• Extensible design
• Error handling paths
• Configuration flexibility
• Integration points