Hi all.
This is retype post from Andrew "How to run Stable Diffusion on AWS".
Running Stable Diffusion in the cloud (AWS) has many advantages. You rent the hardware on-demand and only pay for the time you use. You don’t need to worry about maintaining the hardware.
Author set up a personal cloud server to run AUTOMATIC1111, ComfyUI, and SD Forge for saving storage space, the three Stable Diffusion software share models.
When do you want to use the Cloud?
The benefits of using a personal cloud server to run Stable Diffusion are:
- You don’t need to buy and maintain hardware. The cloud provider is responsible for the capital cost and maintenance.
- You can easily rent a more powerful GPU if you need it.
- You can access the machine anywhere, even when you are traveling.
Setting up a cloud server requires some technical expertise and can be time-consuming. You can use Google Colab notebooks as alternative method.
Cloud server setup
This article will guide you in setting up a Stable Diffusion cloud server for personal use. You will use Amazon Web Service (AWS) to set up the cloud system.
AWS is Amazon’s cloud computing service. You can rent computer resources such as CPU, GPU, RAM, storage, and public IP addresses on demand. You only pay for the hours you use.
We will use:
- EC2: Compute instance to host the Stable Diffusion server. You can select the CPU, GPU, and RAM specs. The instance will have options to run A1111, ComfyUI, or SD Forge.
- Elastic IP: Fix the IP address of the EC2 instance. Without it, the IP address will change everytime you stop and start the instance.
- S3 bucket (optionally): For storing the AI models more economically.
Notes:
You should stop the instance after each session. Otherwise, it will keep charging at the rate of a running instance. The storage is persistent, meaning that all the files and settings stay the same between sessions. It is no different from your local PC. See the summary of commands at the end.
Personal prerequisite - to follow this tutorial you should have a basic knowledge of using Linux with a terminal.
PS: of course, you can choose a Amazon Machine Image as Windows11 and simply upload your portable builds of A1111, ComfyUI and SD Forge to running EC2 instance.)