Stable Diffusion Setup on RunPod

setup stabl diffusion on runpod

Stable Diffusion is a powerful generative AI model that can be used to create stunning images. However, setting up Stable Diffusion can be a bit complicated, especially if you’re not familiar with cloud computing platforms.

In this blog article, I will walk you through the steps to set up Stable Diffusion on RunPod, a cloud computing platform that makes it easy to run AI models. By the end of this article, you will have your own stable diffusion setup in the cloud to create your own Stable Diffusion artwork and experiments. We have also provided a guide on How To Install Stable Diffusion On PC as an alternative option to get you up and running with stable diffusion.

What is RunPod?

RunPod is a cloud computing platform that makes it easy to run AI models and more. RunPod provides a hosted environment with GPUs and other resources that you can use to run your models without having to worry about setting up and maintaining your own infrastructure.

There are a few reasons why you might want to use RunPod to run Stable Diffusion:

  • Ease of use: RunPod is very easy to use, even if you’re not familiar with cloud computing platforms. You can create an account and start running models in minutes.
  • Cost-effectiveness: RunPod is very cost-effective, especially if you’re only using it occasionally. You only pay for the resources that you use, so you won’t have to overspend on a dedicated GPU.
  • Scalability: RunPod is scalable, so you can easily increase or decrease the resources that you’re using as needed. This is important for Stable Diffusion, as it can be very demanding on resources.

How do I run the stable diffusion workspace on RunPod?

Before setting up stable diffusion, you need to know about the Automatic1111 WebUI, which is a web interface where we will run our stable diffusion models. Please read below to know more about Automatic1111

Automatic1111 is a web-based UI for Stable Diffusion that makes it easy to generate images and videos with the model. It offers a number of features that make it a great choice for users who want to get started with Stable Diffusion:

  • Ease of use: Automatic1111 is very easy to use, even if you’re not familiar with Stable Diffusion. The UI is intuitive and straightforward, and there are plenty of tutorials available to help you get started.
  • Powerful features: Automatic1111 offers a number of powerful features that allow you to control the output of Stable Diffusion. You can adjust the denoising strength, the prompt length, and the number of iterations, among other things.
  • Community support: Automatic1111 has a large and active community of users who are always willing to help out. If you’re running into problems or have questions, you can easily find help from other users.
  • Free to use: Automatic1111 is free to use for personal and commercial use.

Stable Diffusion setup steps with RunPod: Getting Started

  1. To rent a cloud GPU to run stable diffusion, you need to create a RunPod account at runpod.io and once you created the account, add credits to your account in the billing tab.
screenshot showing stable diffusion setup on  on runpod 1
  1. To rent a cloud GPU to run stable diffusion, you need to create a RunPod account at runpod.io and once you created the account, add credits to your account in the billing tab.Navigate to the “Community Cloud” tab and look for a graphics card with 16-24 GB of VRAM. Alternatively, choose a graphics card that is appropriate for your budget. There is no need to select high-end GPUs, as their hourly rates are very high. A lower-end GPU will suffice for Stable Diffusion at a good rate. After that, click on the “Deploy.”option.
  1. Once you click on the “Deploy” option, you will be automatically taken to a new page. On this page, locate the “Stable Diffusion” template and choose “RunPod Stable Diffusion.” Then, proceed by clicking on the “continue” button as shown in the image below.
  1. After you reach the next page, simply click the “Deploy” button.
install stable diffusion on runpod 4
  1. After Deploying. Next, click on “Pods” in the left pane of the run pod website. You will find the pod that you just created with the stable diffusion template there. Wait for two to five minutes for the pod to set up on its own and the connect button will show up. Then, click on the “Connect” option as shown in the image below..
  1. After clicking on “Connect,” a pop-up dialog box will appear. Select the “Connect to Jupyter Lab” option in this box, as shown in the image below.
install stable diffusion on runpod 6
  1. Clicking on the “Connect to Jupyter Lab” option will open the Jupyter Notebook for your Pod, as shown in the image below.
install stable diffusion on runpod 4
  1. Firstly, from the left pane, open the “stable-diffusion-webui” folder. Look for the “webui-user.sh” file and double click on it to open it.

Once the file is open, its contents will be displayed on the right side of the screen.

Modify the line that starts with “export COMMANDLINE_ARGS” by adding “–gradio-auth username:password” at the end. You can choose any username and password you prefer. For example: “–gradio-auth Adam:Rocky123”.

After making the changes, click on “File” in the top menu, then select “Save File”. This step will add password protection to our stable diffusion interface and prevent misuse.

Please refer to the image below.

install stable diffusion on runpod 8
  1. Next, close the JupyterLab site and return to the Pods section on the RunPod Site.

Now, look for the More actions button and click on the restart pod button, as shown in the image below.

install stable diffusion on runpod 9
  1. After the pod has restarted successfully, click on the “Connect” option. Then, in the pop-up dialog box, click on the “Connect to HTTP Service” button
install stable diffusion on runpod 88
  1. After clicking on the “Connect to HTTP Service” button, you will be redirected to the Automatic1111 WebUI interface. 

Enter the username and password you set in step 6 to log in.

install stable diffusion on runpod 10
  1. Congratulations! You have successfully run stable diffusion on the cloud. You can now use the Automatic1111 interface to start generating images.
install stable diffusion on runpod 11
install stable diffusion on runpod 13
  1. After you have finished generating images with stable diffusion, make sure to stop the pod on the RunPod site. Otherwise, you will be charged hourly even if you are not using the stable diffusion. This is very important, so do not forget.
install stable diffusion on runpod 14
  1. To reutilize the stable diffusion, simply initiate your pod by clicking the play button. Afterward, wait for 2-5 minutes until the connect button becomes visible. Once it appears, click on it and then proceed to select the “Connect to HTTP Service” button. The Automatic1111 Webui will promptly open.

And there you have it, the steps to have your own affordable, functioning Stable diffusion setup on RunPod. I hope you’ve been able to successfully complete the steps. Please leave a comment below if you have any questions or feedback, and thank you for reading this guide.

To use Stable Diffusion effectively, please have a look at our other Stable Diffusion Content  Enjoy your image generating!

Leave a Reply

Your email address will not be published. Required fields are marked *