Running Automatic1111 Stable Diffusion Web UI on a GPU for Free

Tosh Velaga
6 Oct 202308:17

TLDRThe video provides a guide on running Automatic 1111 Stable Diffusion Web UI for free on a GPU, highlighting the current limitations of Google Colab. It suggests using AWS SageMaker Studio Lab, which offers free GPU and CPU, and outlines the application process. The tutorial continues with cloning the necessary repository, installing bindings, and launching the web UI. It also demonstrates how to use a proxy service to access the UI and download additional models from, showcasing the potential of the tool with an example.


  • 🌐 The video provides a guide on running Automatic 1111 Stable Diffusion Web UI on a GPU without cost.
  • 🚫 Google Colab, a previously free resource, is now blocked making it difficult to test different models.
  • 💻 Use AWS SageMaker Studio Lab which offers free GPU and CPU resources upon approval, typically within 1-2 days.
  • 📚 Once approved, you get 8 hours of CPU and 4 hours of GPU daily for a Python notebook.
  • 🔄 To utilize Automatic 1111, a GPU is essential for performance and easier setup.
  • 🛠️ Start by applying for access to SageMaker, adding your name and company, and waiting for approval.
  • 📂 After access, clone the Automatic 1111 Stable Diffusion Web UI repository and navigate into it.
  • 🔧 Install necessary bindings to connect to lower-level C code for smooth operation.
  • 🌐 Launch the web UI using a command that speeds up inference and tunnels the instance for internet access.
  • 🔑 Create an account on enro to use a free token for secure access to the web UI.
  • 🎨 Download additional models from for more options in the UI, such as the realistic 'epic photo gasm' model.

Q & A

  • What is the main topic of the video?

    -The main topic of the video is how to run Automatic 1111 Stable Diffusion Web UI on a GPU for free.

  • Why is it currently difficult to test different models with Stable Diffusion?

    -It is difficult because resources such as Google Colab, which were previously available, are currently being blocked.

  • What resource from AWS is suggested for obtaining a free GPU and CPU?

    -AWS Sage Maker Studio Lab is suggested for obtaining free GPU and CPU resources.

  • How long does it typically take to get approved for access to AWS Sage Maker Studio Lab?

    -It usually takes about one to two days to get approved for access.

  • What is the limit on CPU and GPU usage per day in AWS Sage Maker Studio Lab?

    -The limit is 8 hours of CPU per day and 4 hours of GPU per day.

  • What is the first step to set up Automatic 1111 in the Studio Lab?

    -The first step is to select GPU and click Start runtime after getting access.

  • How is theAutomatic 1111 Stable Diffusion Web UI repository cloned?

    -It is cloned by copying a provided link and using the 'git clone' command in the terminal.

  • What command is necessary to install before launching the web UI?

    -A command to install a binding to the lower-level C code is necessary, which is抽象ed away from users.

  • How is the instance tunneled over the Internet for others to access the UI?

    -The instance is tunneled using a service like enro, which is a free service that requires creating an account and generating an access token.

  • What website is recommended for downloading additional models besides the default one? is recommended for downloading third-party models and checkpoints.

  • How long does it take to download an additional model like epic photo gasm?

    -It takes about a minute to download an additional model from the web.



🖥️ Setting Up Free GPU Access for Stable Diffusion with AWS SageMaker Studio Lab

The video begins with an introduction to running Automatic 1111 for free using a GPU on AWS SageMaker Studio Lab, especially since resources like Google Colab are blocking similar usages. The presenter explains that obtaining access to SageMaker Studio Lab usually takes about one to two days. Once approved, users have access to a Python notebook with limited daily GPU and CPU usage. The setup process involves applying with basic information, selecting a GPU, and starting the runtime. The presenter emphasizes the ease of this process and demonstrates how to clone the necessary repository for Stable Diffusion, handle software dependencies, and start the web UI using specific commands. Tips on avoiding errors and tunneling the instance for web UI access are also covered.


📦 Downloading and Using Custom Models in Stable Diffusion

In the second part of the video, the presenter explains how to download and integrate third-party models into the Stable Diffusion setup in AWS SageMaker Studio Lab. The process involves copying a model link, downloading it using wget in the notebook's terminal, and ensuring the file type is correct to prevent executing malicious code. The presenter highlights the vast availability of models on so Civ and demonstrates how to refresh the web UI to use the newly downloaded model. A realistic image generation is shown using the downloaded model, with a call to action for viewers to suggest better methods or share their experiences in the comments. The presenter promises to provide the command scripts in the video description for viewer convenience.



💡Automatic 1111

Automatic 1111 refers to an AI model in the context of the video, which is likely a version of a Stable Diffusion model. It is a machine learning model capable of generating images or text based on input prompts. The video's main theme revolves around running this model for free on a GPU, which is essential for its efficient operation.

💡Google Colab

Google Colab is a cloud-based platform offered by Google that allows users to run Python code in a Jupyter notebook environment without needing to set up a local environment. It provides free access to computing resources, including GPUs. However, the video mentions that resources like Google Colab are currently being blocked, which necessitates finding alternative free GPU resources.

💡AWS SageMaker Studio Lab

AWS SageMaker Studio Lab is a cloud-based service provided by Amazon Web Services (AWS) that offers free access to both CPU and GPU resources for machine learning purposes. The video emphasizes using this service to access a GPU for running Automatic 1111, highlighting its importance due to the blocking of other free resources like Google Colab.


GPU stands for Graphics Processing Unit, a specialized electronic circuit designed to rapidly manipulate and alter memory to accelerate the creation of images in a frame buffer intended for output to a display device. In the context of the video, a GPU is crucial for running the Automatic 1111 model because it allows for faster processing of the AI's image generation tasks, which would otherwise be unbearably slow on a CPU alone.

💡Python Notebook

A Python Notebook is an interactive computer-based environment that allows creation and sharing of documents that contain live code, equations, visualizations, and narrative text. In the video, the presenter mentions using a Python Notebook within AWS SageMaker Studio Lab to run the Automatic 1111 model, indicating that this environment is suitable for executing the necessary code and commands.

💡Clone the repo

To 'clone the repo' refers to the action of making a copy of a repository, which is a data structure that stores project files and related information, typically used in software development and version control. In the context of the video, cloning the repo means copying the specific codebase for the Automatic 1111 Stable Diffusion Web UI from its original location to the user's local machine or the cloud-based environment.


In the context of programming and software development, a 'binding' refers to the process of connecting or linking one piece of software to another, often to facilitate communication or interaction between them. In the video, the presenter mentions installing a binding to lower-level C code, which means linking the higher-level Python code with the lower-level C language code to ensure proper functionality of the AI model.


In machine learning and AI, 'inference' is the process of using a trained model to make predictions or draw conclusions on new data. In the context of the video, speeding up inference refers to optimizing the process of generating outputs from the AI model using the GPU's computational power, which is essential for efficient and fast results.


Tunneling, in the context of computer networking, refers to the process of transporting data from one network to another, often through a secure connection. In the video, the presenter mentions tunneling the instance over the Internet, which means creating a secure connection to allow external access to the AI model's web UI.


Enro, as mentioned in the video, is a free service that likely provides a secure tunneling solution, allowing users to safely access their instances over the Internet. The presenter uses an Enro token to facilitate this connection, which is a common practice in cloud computing and remote access scenarios.

💡Pie Torch

Pie Torch, presumably a typographical error in the script, is likely meant to refer to PyTorch, an open-source machine learning library based on the Torch library. PyTorch is widely used for applications such as computer vision and natural language processing. In the context of the video, installing PyTorch and its dependencies is a prerequisite step for running the Automatic 1111 model.

💡Safe Tensors

Safe Tensors, in the context of machine learning and AI, likely refers to a library or mechanism that ensures the safety and integrity of tensor operations, which are fundamental to deep learning models. The video suggests using a command related to Safe Tensors to prevent the execution of malicious code, indicating a focus on security when running the AI model.


Running Automatic 1111 Stable Diffusion Web UI on a GPU for free

Google Colab resources are currently blocked, making it difficult to test different models

AWS SageMaker Studio Lab provides free GPU and CPU resources

Apply for access to SageMaker Studio Lab, approval takes about a day

Once approved, you get 8 hours of CPU or 4 hours of GPU daily

Accessing the GPU is essential for Automatic 1111 to avoid unbearably slow performance

Simple application process by adding your name and company

Create a new terminal in Studio Lab for the setup process

Clone the Automatic 1111 Stable Diffusion Web UI repository

Install necessary bindings for the lower-level C code

Launch the web UI with a command to speed up inference

Tunnel the instance over the Internet for external access

Create an account on enro for a free service to use as a tunnel

Download and use additional models from

Epic Photogasm model provides realistic images

Download third-party models and checkpoints from

Refresh the UI to see the newly downloaded model and use it

The process is straightforward once you've set it up

The video description contains a copy-paste guide for easy setup