How bing-su/adetailer works
Main Components
a) Core Components:
• ADetailer Extension Core
• Detection Models Integration
• Inpainting System
• ControlNet Integration
• WebUI Integration Layer
b) External Dependencies:
• Stable Diffusion WebUI
• Ultralytics YOLO
• MediaPipe
• ControlNet (optional)
┌─ User Interface Layer ─────────────────────┐
• Stable Diffusion WebUI │
• ADetailer Extension UI │
• Processing Layer ──────────────────────────┤
• ┌─ ADetailer Core ─────────────────────┐ │
• Detection Pipeline │ │
• Mask Processing │ │
• Inpainting Pipeline │ │
• ┘ │
• Model Layer ────────────────────────────────┤
• ┌─ Detection Models ─┐ ┌─ Inpainting ──┐ │
• YOLO Models │ │ - SD Models │ │
• MediaPipe │ │ - ControlNet │ │
• ┘ └──────────────┘ │
• ┘
Key Components to Highlight
a) Core Modules (based on file structure):
• args.py: Configuration handling
• mask.py: Mask generation and processing
• mediapipe.py: MediaPipe integration
• ultralytics.py: YOLO model integration
• controlnet_ext: ControlNet integration
b) Processing Flow:
Important Relationships
• Bidirectional communication between WebUI and ADetailer
• Sequential processing flow
• Optional components (ControlNet)
• Model loading paths
• Configuration flow
Technical Details
• Supported model formats (.pt files)
• Input/output formats
• Configuration options
• API endpoints (for REST API support)