Updated on 2023-08-10 GMT+08:00

Solution Overview

Scenarios

This solution helps you use Stable Diffusion to build high-availability Artificial Intelligence-Generated Content (AIGC) web applications on Huawei Cloud Elastic Cloud Server (ECS). Stable Diffusion is a latent text-to-image diffusion model capable of generating photo-realistic images given any text and images input.

Solution Architecture

This solution helps you use Stable Diffusion to build high-availability AIGC web applications on Huawei Cloud Elastic Cloud Server (ECS). The following figure shows the architecture of this solution.
Figure 1 Solution architecture

The following resources are required for deploying this solution:

  • Two GPU-accelerated Linux ECSs, which will be used for running AIGC applications
  • Three Elastic IP addresses (EIPs), which will be bound to the two Linux ECSs and an Elastic Load Balance (ELB), respectively, for internal and external communication
  • An ELB, which will be used to distribute traffic across availability zones (AZs)
  • An Object Storage Service (OBS) bucket, which will be used to store generated image files
  • Stable Diffusion web UI, inotify-tools, and OBS obsutil, which will be installed on each Linux ECS to automatically upload the images saved on the web UI

Advantages

  • High availability

    ECSs are deployed across AZs for multi-AZ disaster recovery (DR) and automatic, quick failover.

  • Open source and custom development

    This solution is open-source and free for commercial use. You can also make custom development based on source code.

  • Easy deployment

    You can easily deploy this solution with just a few clicks.

Constraints

  • Before deploying this solution, you need to have created a Huawei Cloud account and completed real-name authentication. You also need to ensure that the account is not frozen and has sufficient balance to pay for the resources required. You can estimate the total price according to the resource planning and costs tables.