Stable Diffusion on PaperSpace: Full Step-by-step Setup

stable diffusion on paperspace

Stable diffusion is a new AI technique for generating images that are both realistic and creative. It is based on the diffusion models that have been used for image generation for many years, but it has been improved to be more stable and to generate higher-quality images.

In this blog article, I will show you how to set up Stable diffusion on Paperspace cloud platform. Paperspace is a great option for running stable diffusion because it offers powerful GPUs that can handle the computationally demanding task of image generation.

What is Paperspace?

Paperspace is a cloud computing platform that offers GPU-powered virtual machines. It is a great option for running computationally demanding tasks such as image generation with stable diffusion.

Paperspace offers paid plans starting at $8 per month that allow you to use a Free GPU for up to 6 hours per day and you can restart the notebook and use it again. This is sufficient for running the stable diffusion web UI.

Benefits of using PaperSpace for stable diffusion:

  • Paperspace offers powerful GPUs that can handle the computationally demanding task of image generation.
  • Paperspace is easy to use and can be set up in minutes.
  • Paperspace is affordable, with plans starting at just $8 per month.

How do I run the Stable diffusion on PaperSpace ?

There are two ways to run the stable diffusion workspace on Paperspace:

  • Using the automatic1111 web UI: This is the easiest way to get started with stable diffusion on PaperSpace. The web UI takes care of all the setup and configuration for you, so you can just focus on generating images.
  • Setting up your own environment: This gives you more control over the setup, but it is more complex. You will need to install the necessary software, configure the environment, and download the stable diffusion model.

I suggest utilizing the automatic1111 web UI if you’re unfamiliar with stable diffusion or aiming for a straightforward initiation process. Opting for the automatic1111 web UI when running stable diffusion on PaperSpace is a wise decision due to its user-friendly nature and its ability to handle all the necessary setup and configuration tasks on your behalf. 

This guide will demonstrate the steps to effectively employ the Automatic1111 web UI on the PaperSpace platform. 

Installing Stable Diffusion Automatic1111 WebUI on PaperSpace Notebook

Upgrade to a Suitable PaperSpace Plan:

  1. To utilize the Automatic1111 WebUI for stable diffusion, you’ll require a robust graphics card. Paperspace offers powerful graphics cards for free, but these are accessible under the pro or growth subscription plans. If you’re not already on a paid plan, you can upgrade through this link: https://www.paperspace.com/pricing 
paperspace on stabel diffusion price list

Create a PaperSpace Project:

  1. Log in to your Paperspace account. Choose the “Gradient” option from the dashboard. Click on “Create Project” and provide a meaningful name for your project. Create the project.
Stable diffusion on PaperSpace welcome page

Stable diffusion on PaperSpace UI
  1. Set Up a Notebook Environment
  • Inside your created project, select “Create Notebook.”
  • Choose “PyTorch” as the runtime for the notebook.
Stable diffusion on PaperSpace UI and options
  1. Choose a GPU:
  • Under “Select a Machine,” opt for any of the available free GPUs.
  • Click on “Start Notebook.” This ensures that you only choose a GPU marked as “free” to avoid extra charges beyond your subscription.
PaperSpace UI to select CPU
  1. Access the Notebook:
  • Once the notebook starts, you’ll be redirected to a new page. Allow some time for the notebook to initialize.
  • Upon startup completion, choose the “Open in JupyterLab” option.
Paperspace Access notebook UI
  1. Setup Commands in JupyterLab:

The JupyterLab interface will open, providing you with a notebook environment.

Jupiter UI
  1. Run Necessary Commands:

Inside the JupyterLab notebook, follow these steps:

  • Create a new notebook
  • Create a new notebook cell.
  • Copy and paste the commands
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git

%cd /notebooks/stable-diffusion-webui

!git checkout master

!git pull
  • Create another new notebook cell.
  • Copy and paste the commands 

!pip uninstall -y torch torchvision torchaudio protobuf

  • Create a final new notebook cell.
  • Copy and paste the commands
%cd /notebooks/stable-diffusion-webui

!python launch.py --share --xformers --enable-insecure-extension-access
  • Run each cell sequentially by clicking the “Run” button for each cell. This will execute the required commands for setup.
annotated paperspace UI on with backgropund
  1. Access WebUI Link:

After running the third command, a link will be provided as output in the notebook. Please refer to the red box highlighted in the image below. Click on the provided link. This will redirect you to the Stable Diffusion Automatic1111 WebUI interface.

paperspace UI whit background
  1. Start Image Generation:

Upon accessing the Automatic1111 WebUI, you can start generating images using the stable diffusion models.

Paperspa ce UI with car on front page and orange button in the top left of page

By following these steps, you’ll successfully set up the Stable Diffusion Automatic1111 WebUI on your Paperspace Notebook, enabling you to generate images using the stable diffusion models.

Join Our Tech Community!

Subscribe & get an instant FREE gift! + receive news, updates, and special gifts straight to your inbox.

You Might Also Like

Where Should We Send The Gift?

Provide your name and email, and we’ll send the guide directly to your inbox!

How to Create the Perfect ChatGPT Prompt for Precise Answers!

Crafting an effective prompt is a learnable skill. Your choice of words in the prompt directly influences ChatGPT’s responses. This guide will show you the key elements for getting the right response.