How enesdertli/pictograph-sd works
Client Layer
• Discord Client/Server
• Users interacting with the bot through Discord
Bot Layer
• Discord Bot (implemented in main.py)
• Discord API Integration (using discord-py-interactions library)
Service Layer
• Stable Diffusion Web UI
• Stable Diffusion Web UI API (running on http://127.0.0.1:7860)
Flow and Connections
a. User → Discord Client (Input: commands and prompts)
b. Discord Client → Discord Bot (via Discord API)
c. Discord Bot → Stable Diffusion Web UI API
d. Stable Diffusion Web UI → Discord Bot (Image response)
e. Discord Bot → Discord Client (Final image output)
Important Details
• API endpoints (/docs, /text2img)
• Key parameters used (prompt, style, negative_prompt, steps, width, height)
• Port number (7860) for the Stable Diffusion Web UI
• Environment variables (TOKEN)
Additional Elements
• Notes about required configurations
• Authentication flow (Discord Token)
Specific Considerations:
• Keep the focus on the integration aspects rather than internal Stable Diffusion workings
• Asynchronous nature of image generation requests
• Error handling paths
• Configuration requirements (COMMANDLINE_ARGS=--api)