Guidance For Asynchronous Inference With Stable Diffusion On Aws banner
aws-solutions-library-samples aws-solutions-library-samples

Guidance For Asynchronous Inference With Stable Diffusion On Aws

DevOps community

Description

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.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

[Guidance for Asynchronous Inference with Stable Diffusion on AWS](https://aws.amazon.com/solutions/guidance/asynchronous-image-generation-with-stable-diffusion-on-aws/)

Implementing a fast scaling and low cost Stable Diffusion inference solution with serverless and containers on AWS

[Stable Diffusion](https://aws.amazon.com/what-is/stable-diffusion/) is a popular open source project for generating images using Generative AI. Building a scalable and cost efficient Machine Learning (ML) Inference solution is a common challenge that many AWS customers are facing. This project shows how to use serverless architecture and container services to build an end-to-end low cost, rapidly scaling asynchronous image generation architecture. This repo contains the sample code and CDK deployment scripts that will help you to deploy this solution in a few steps.

Features

  • Asynchronous API and Serverless Event-Driven Architecture
  • Image Generation with open source Stable Diffusion runtimes running on Amazon EKS (Kubernetes 1.35)
  • Automatic Amazon SQS queue length based scaling with KEDA
  • Automatic provisioning of EC2 instances for Amazon EKS compute Nodes with Karpenter v1 (stable CRDs)
  • SOCI Parallel Pull with NVMe instance store for fast container startup (up to 60% faster image pulls)
  • Scaling up new Amazon EKS nodes within 2 minutes to run Inference tasks
  • Saving up to 70% with AWS GPU spot EC2 instances
  • Bottlerocket OS with IMDSv2 enforced for enhanced security

Deployment Documentation

Please see detailed Implementation Guides here:

  • [English](https