How adieyal/dynamicprompts works
Main Components
a) Core Components:
• Parser System
• Generator System
• Wildcard Management System
• Sampler System
• Command System
b) External Integrations:
• Text-to-Image Systems (Stable Diffusion, MidJourney, Dall-e 2)
• Lexica.art API Integration
• HuggingFace Model Integration
┌─ External Systems Layer ─────────────────────┐
• [Text-to-Image Systems] [Lexica.art] │
• [HuggingFace Models] │
• ┬───────────────────────┬─┘
┌─ Generator Layer ─▼───────────────────────▼─┐
• ┌─────────────────────┐ ┌────────────────┐ │
• Prompt Generators │ │Magic Generators │ │
• ┘ └────────────────┘ │
• ┬───────────────────────┬─┘
┌─ Core Layer ──────▼───────────────────────▼─┐
• ┌─────────┐ ┌──────────┐ ┌──────────────┐ │
• Parser │ │ Samplers │ │ Commands │ │
• ┘ └──────────┘ └──────────────┘ │
• ┬──────────────────────┬──┘
┌─ Data Layer ──────▼──────────────────────▼─┐
• ┌────────────────┐ ┌───────────────────┐ │
• Wildcard System │ │ Template Storage │ │
• ┘ └───────────────────┘ │
• ┬──┘
Component Details
a) Parser System:
• Flow from raw template to parsed commands
• Config handling and syntax parsing
• To the command system
b) Generator System:
• Generator types (Random, Combinatorial, Magic, etc.)
• Connection to samplers
• Integration points with external services
c) Wildcard System:
• Hierarchy of wildcard collections
• File system integration
• Wildcard manager coordination
d) Command System:
• Different command types
• Command processing flow
• To generator system
Data Flow Indicators
• Template input flow
• Command processing direction
• Generator output flow
• External service interactions
Integration Points
Clearly mark:
• API endpoints for external services
• Model integration points
• File system access points
• Extension mechanisms
Additional Elements
• Version/configuration management
• Test integration points
• Primary API entry points
Remember to include notes about:
• The template processing pipeline
• Wildcard resolution mechanism
• Generator strategy pattern implementation
• External service integration patterns
• Error handling and validation flows
This will provide a complete picture of the system's architecture while maintaining clarity and usefulness for implementation and maintenance purposes.