All Projects
Generative AIDeploymentFeatured
AI Image Generation Platform (Ofoto)
Production deployment of Stable Diffusion (Automatic1111 + ControlNet) with FastAPI backend, Vue.js frontend — 500+ concurrent requests, 99.9% uptime, -35% latency, -40% release time.
99.9%
Uptime
-35%
Latency reduction
500+
Concurrent requests
-40%
Release time reduction
Approach
Async FastAPI + containerized Stable Diffusion engine behind Nginx load balancer
Tech Stack
PythonFastAPIStable DiffusionControlNetVue.jsDockerNginxCUDA
Keywords
Stable DiffusionControlNetFastAPIVue.jsDockerNginxGPU
Deep Dive
End-to-end production deployment of an AI image-generation platform at Ofoto. Challenge: handle 500+ concurrent Stable Diffusion inference requests with consistent quality and sub-10s response times.
Architecture
Client (Vue.js) → Nginx (SSL + Load Balancing)
→ FastAPI (async queuing + background tasks)
→ Stable Diffusion Engine (Automatic1111 + ControlNet)
→ Docker containers (GPU-accelerated, CUDA 11.8)
Key Engineering Decisions
- ▸Async request queuing with FastAPI background tasks — never blocks main thread
- ▸Nginx keepalive connections — dramatically reduces overhead under high load
- ▸Docker multi-stage build with CUDA 11.8 for reproducible GPU access
- ▸Health-check endpoints for container orchestration and zero-downtime deploys
- ▸ControlNet integration for image-conditioned generation (pose, depth, canny edges)
Results
| Metric | Before | After |
|---|---|---|
| Avg latency | 12.4s | 8.1s (-35%) |
| Concurrent requests | 50 | 500+ |
| Service uptime | 94% | 99.9% |
| Release cycle | 5 days | 3 days (-40%) |