aws-solutions-library-samples/guidance-for-asynchronous-inference-with-stable-diffusion-on-aws

Stable Diffusion is a popular Open Source project for generating images using Gen AI. Building a scalable and cost efficient inference solution is a common challenge. This project shows how to use AWS serverless and container services to build an end-to-end scalable, secure and price effecient asynchronous image generation architecture.

44
/ 100
Emerging

The architecture orchestrates request validation through API Gateway and Lambda, then routes prompts via SNS to model-specific SQS queues that trigger KEDA-based pod scaling on EKS. Karpenter provisions GPU instances (g5/g6/p4) with spot pricing support and SOCI Parallel Pull for optimized container startup, while Stable Diffusion runtimes stream model weights on-demand from S3 via the Mountpoint CSI driver. The solution uses Infrastructure-as-Code (AWS CDK) for reproducible deployment and achieves sub-$0.001 per-image inference costs at scale by combining serverless orchestration with efficient container scheduling.

No Package No Dependents
Maintenance 13 / 25
Adoption 7 / 25
Maturity 9 / 25
Community 15 / 25

How are scores calculated?

Stars

38

Forks

7

Language

Python

License

MIT-0

Last pushed

Mar 10, 2026

Commits (30d)

0

Get this data via API

curl "https://pt-edge.onrender.com/api/v1/quality/diffusion/aws-solutions-library-samples/guidance-for-asynchronous-inference-with-stable-diffusion-on-aws"

Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.