avatarJim Clyde Monge

Summary

The web content provides a step-by-step guide on how to install and run Stable Diffusion 2.0 locally on a PC using a user-friendly Web UI, with a focus on Windows and NVidia GPU systems.

Abstract

The article "A Simple Way To Run Stable Diffusion 2.0 Locally On Your PC — No Code Guide" by Jim Clyde Monge offers a comprehensive tutorial for users interested in utilizing the latest AI-driven image generation model, Stable Diffusion 2.0. It outlines the system requirements, including a Windows 10/11 operating system, an NVidia RTX GPU with a minimum of 8 GB VRAM, and at least 25 GB of disk space. The guide details the necessary software prerequisites, such as Python 3.11.0 and the latest git release, and provides instructions on downloading the project file from GitHub, either as a zip or via git clone. It also explains how to obtain and place the checkpoint and configuration files correctly. The article walks readers through launching the Web UI by running the webui-user.bat file, accessing the interface through a localhost link, and generating images using text prompts. The author emphasizes the ease of use and shares personal experience, including troubleshooting tips like ensuring the correct file extensions. The guide concludes by mentioning the current limitations of the Web UI tool, which at the time of writing, supports only the text-to-image feature of Stable Diffusion 2.0.

Opinions

  • The author, Jim Clyde Monge, believes that running Stable Diffusion 2.0 locally is straightforward and accessible, even for users without coding experience.
  • The author expresses enthusiasm about the new features of Stable Diffusion 2.0, such as depth-guided image generation and text-guided inpainting.
  • There is an acknowledgment of potential issues with systems having less than 8 GB of VRAM, suggesting that 8 GB is the safe minimum for a smooth experience.
  • The author shares a personal anecdote about a common pitfall, the hidden file extensions in Windows, which can cause confusion and delay during the setup process.
  • The author is optimistic about the future development of the Web UI tool, anticipating the addition of more features from Stable Diffusion 2.0, such as Img2Img and depth-conditional image generation.

A Simple Way To Run Stable Diffusion 2.0 Locally On Your PC — No Code Guide

Image by Jim Clyde Monge. AI art by AlphaLeague and Freizeit

It’s no exaggeration to say that AI has been making tremendous strides in the past few months, and the newest development in this field is the release of Stable Diffusion 2.0.

This new model from Stability AI is packed with brand-new features like depth-guided image generation, text-guided inpainting, and more. You can read more information about SD 2.0 here.

In this article, I’m going to show you how you can run the new model locally on your PC with an easy-to-use Web UI.

System Requirements

Make sure that your current system meets the minimum requirements to run the model. In this tutorial, I will be using Windows and NVidia.

  • Windows 10/11
  • NVidia RTX GPU with at least 8 GB of VRAM (lower RAM may work but could run into issues)
  • At least 25 GB of local disk space

Environment Setup

Download and install the following dependencies.

If all is well so far, we’re ready to install Stable Diffusion 2.0 locally.

Step #1. Download the project file

You have the option to download the project file as a zip file or clone the project via git. In this example, let’s download the project as a zip file.

Automatic111 stable diffusion WebUI project

Extract the file locally, preferably in the root of the C:\ directory to avoid path problems.

Step #2. Download the checkpoint file

Download the checkpoint file “768-v-ema.ckpt” from hugging face and paste it inside the following folder.

C:\stable-diffusion-webui\models\Stable-diffusion\
Stable Diffusion checkpoint files

Download the config yaml file too and rename it the same as the checkpoint file.

Both files should be in the same folder as in the image above. Also, make sure the file extension of the yaml file is not “.txt”. I had to spend a good 30 minutes debugging this because the file extensions were hidden lol.

Step #3. Generate images

Double-click the webui-user.bat file and wait until all dependencies are installed. You should see the localhost link below.

WebUI-master cmd

Open the URL in your browser, and the Web UI should be displayed.

stable diffusion 2.0 WebUI

Input the image text prompt and press the "Generate" button. Change the resolution to as much as your graphics card can handle.

I can push the resolution to 1028x1028 on my NVidia RTX 3060 Ti with 8 GB VRAM.

Here’s an example:

Prompt: A photorealistic image of an astronaut riding a horse on mars
Image by Jim Clyde Monge

Awesome. You can play around with the settings and adjust the parameters to render the image that you want.

That’s it. I hope you get it to work on your side. If you have any issues, feel free to post them in the comments, and I will try my best to answer them.

For now, the web UI tool only works with the text-to-image feature of Stable Diffusion 2.0. Other features like Img2Img or the brand-new depth-conditional image generator are yet to be supported.

Technology
Stable Diffusion
Artificial Intelligence
How To
Tutorial
Recommended from ReadMedium