How sanster/iopaint works
IOPaint is a self-hosted image inpainting and outpainting application: users load an image, define a mask and editing options, run a selected AI model, and save or browse results. Its backend also supports command-line batch processing and optional segmentation, background removal, upscaling, and face-restoration plugins. The graph preserves documented model families and plugin capabilities, but several of their internal connections are not evidenced by the sampled source; those links are omitted or marked unverified.
Main entry points: model_manager.py Model manager · api.py HTTP API · App.tsx Web app shell · file_manager.py File manager
Components 18
Editing interface
- Image editor
web_app/src/components/Workspace.tsx - Web app shell
web_app/src/App.tsx - Editor state
web_app/src/lib/states.ts - File browser
web_app/src/components/FileManager.tsx
Service and files
- HTTP API
iopaint/api.py - Request schema
iopaint/schema.py - File manager
iopaint/file_manager/file_manager.py - Filesystem storage
iopaint/file_manager/storage_backends.py
AI inference
- Model manager
iopaint/model_manager.py - Erase model family
iopaint/model - AnyText
iopaint/model/anytext/anytext_pipeline.py - BrushNet
iopaint/model/brushnet/brushnet.py - PowerPaint
iopaint/model/power_paint/pipeline_powerpaint.py
Image plugins
- Enhancement plugins
iopaint/plugins - SAM2 segmentation
iopaint/plugins/segment_anything2/sam2_image_predictor.py
Batch use
- Batch command
iopaint/batch_processing.py
Other components
- Web user
- CLI user
Connections 18
- Web user → Web app shell: edits images
README.md - Web app shell → Image editor: renders
web_app/src/App.tsx - Web app shell → Editor state: uses state
web_app/src/App.tsx - File browser → Editor state: updates state
web_app/src/components/FileManager.tsx - File browser → File manager: requests media
- Web app shell → HTTP API: fetches config
- HTTP API → Model manager: dispatches inference
iopaint/api.py - HTTP API → File manager: registers file routes
iopaint/api.py - HTTP API → Request schema: uses requests
iopaint/api.py - File manager → Filesystem storage: reads and saves
iopaint/file_manager/file_manager.py - Model manager → Erase model family: loads models
iopaint/model_manager.py - Model manager → AnyText: loads model
iopaint/model_manager.py - Model manager → BrushNet: loads model
iopaint/model_manager.py - Model manager → PowerPaint: loads model
iopaint/model_manager.py - HTTP API → Enhancement plugins: registers plugins
iopaint/api.py - Enhancement plugins → SAM2 segmentation: offers segmentation
iopaint/plugins/segment_anything2/sam2_image_predictor.py - CLI user → Batch command: starts batch run
README.md - Batch command → Model manager: runs model