How wizhill05/typesafe-image-diffusion works
This is a FastAPI pixel-art generator: a user submits a prompt and refinement count, the service asks Jev one color-choice question per pixel, then optionally repeats using each pixel’s prior color and local neighborhood. The API returns the grid, confidence, usage, and pass history for the browser to display and animate. The README also documents a health endpoint and static UI. The graph focuses on the documented runtime; unsampled UI details are represented at their exact tree path, and edges are limited to relationships shown in main.py or the README.
Main entry points: main.py Pass orchestrator · index.html Prompt and animation UI
Components 17
Web API
- Generate endpoint
main.py - Health endpoint
main.py - Static UI route
main.py - Request validation
main.py - Generation response
main.py
Pixel Generation
- Initial pixel questions
main.py - Refinement questions
main.py - Prompt image state
main.py - Compact pixel rows
main.py - Grid and confidence
main.py - Token usage tracking
main.py - Pass orchestrator
main.py
Jev Model
- TypeSafe client
main.py - Jev System One
Browser UI
- Prompt and animation UI
static/index.html
Other components
- User
- Browser
Connections 20
- User → Prompt and animation UI: enters prompt
README.md - Prompt and animation UI → Generate endpoint: requests generation
README.md - Generate endpoint → Request validation: validates input
main.py - Generate endpoint → Pass orchestrator: calls generation
main.py - Pass orchestrator → Prompt image state: builds state
main.py - Pass orchestrator → Initial pixel questions: builds first pass
main.py - Pass orchestrator → TypeSafe client: submits questions
main.py - TypeSafe client → Jev System One: calls System One
main.py - Jev System One → TypeSafe client: returns answers
main.py - Pass orchestrator → Grid and confidence: extracts answers
main.py - Pass orchestrator → Token usage tracking: accumulates usage
main.py - Pass orchestrator → Compact pixel rows: encodes grid
main.py - Pass orchestrator → Refinement questions: builds next pass
main.py - Compact pixel rows → Refinement questions: provides neighborhoods
main.py - Pass orchestrator → Generation response: assembles result
main.py - Generate endpoint → Generation response: returns JSON
main.py - Generation response → Prompt and animation UI: supplies grid and history
README.md - Browser → Static UI route: opens application
README.md - Static UI route → Prompt and animation UI: serves page
main.py - User → Health endpoint: checks service