Stable Diffusion is a game-changing tool. Not only for artists, but also plain imaginative people. And, unlike it’s biggest online competitors, Stable Diffusion does not require a monthly fee to make your AI art ideas a reality.
However, it does require a bit of technical skill to install on your computer. But don’t worry, I’m going to walk you through the installation requirements and process so you can join the AI art revolution.
Prerequisites and Hardware Requirements
There are a few requirements that must be met in order to install Stable Diffusion on your computer. You must have:
- Windows 10, Windows 11, or Linux as your operating system (this guide will only deal with Windows, as it’s far more common)
- A Nvidia graphics card (so you know, GPU is another common term for a graphics card)
- At least 4 GBs of VRAM on your GPU
Types of Graphics Cards
I have seen repo’s of Stable Diffusion that are intended to work on AMD graphics cards. However, the AI software is really meant to work on GPUs that have CUDA chip architecture…and that is only available on Nvidia. Trying to use another architecture is going to be like bootlegging it. I have a Nvidia card, so I cannot verify personally if any AMD workarounds are operational.
As for VRAM: the more you have, the faster Stable Diffusion can generate images. But if you have too little, then instead of getting output images you may get errors instead. The recommended amount of VRAM is 8 GB, but I’ve heard of some people getting images out of Stable Diffusion with as little as 4 GB. At amounts that small, you may only be able to generate very small images; 512 x 512 pixels may likely be the maximum without getting memory errors.
In case you are not tech savvy, let me clarify what VRAM is. It stands for “video random access memory”. Computers utilize RAM to complete operations in the same way your brain uses short-term memory to remember what you’re doing right now. In modern graphics cards, there is RAM built into the GPU that is separate from your computer’s primary RAM. This VRAM is dedicated to the graphics card for completing video-related tasks. If your computer is on the cheaper side, it may not have an actual graphics card; instead, it may have “integrated graphics” which means the video tasks are handled by the CPU instead.
It’s possible to run Stable Diffusion using just a CPU but it will be a lot more finicky and a whole lot slower. For those of you who have a graphics card installed, here is a quick way to check how much VRAM your current graphics card has:
- Open your Task Manager by right-clicking on your menu bar and selecting “Task Manager”. Once it’s open, go to the “Performance” tab. This tab should display some specs of your GPU, including your total dedicated GPU memory…that is your VRAM.
If you meet the aforementioned requirements, then it’s time to start installing a GUI for Stable Diffusion!
Installation for Windows
In this installation guide, we will be using Automatic1111’s distro of Stable Diffusion that has a web-based graphical interface. This is currently one of the most popular versions and it’s packed to the brim with features.
- First, you need to install Python version 3.10.6 for Windows. Go to this website to download it (it’s not at the top, it’s a bit further down on the left hand side: https://www.python.org/downloads/windows/
- This uses a standard Windows installer. Just follow the install wizard.
- Next, install git (it’s a python command-line program) by downloading it from this site: https://git-scm.com/download/win
- This again uses a standard executable with an install wizard, pretty straightforward
- Now you can download the stable-diffusion-webui by running the command through git.
- From the Search Box in your menu bar, type in “git” and open the program called “Git Bash”
- Enter the following code into the black box that appears:
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
- Download the main Stable Diffusion checkpoint file, either v1.4 or v1.5 (there are newer versions, but I would highly recommend you hold off on v2 for now because it’s a bit wonky). There are several places to get it, but I recommend using the Official page by Huggingface, Inc.
- V1.4 can be found here: https://huggingface.co/CompVis/stable-diffusion-v-1-4-original/blob/main/sd-v1-4.ckpt
- V1.5 can be found here: https://huggingface.co/runwayml/stable-diffusion-v1-5/blob/main/v1-5-pruned.ckpt
- Now place your CKPT file into the “models/Stable-diffusion” folder on your computer. This subfolder was created when you installed the web-ui
Starting the Web UI
Installation is now done!
To run the interface, you just navigate to the folder where it installed, it should look something like:
Next, just double click on the webui.bat file (in your File Explorer, under type, it should say this is a “Windows Batch File”). A black command window will automatically pop open and start loading the program.
Do you see the IP address that follows the text “Running on local URL:”? Copy that IP address link and paste it into the address bar of your preferred Web Browser. Insto presto: you’re now ready to start making art! Give yourself a pat on the back.
How Do You Add Models to Stable Diffusion.
When you are ready to test other models inside Stable Diffusion, the “installation” of them is easy. Hint: you don’t actually have to install anything. Just download whatever models you like and place them in the “models/Stable-diffusion” folder just like you did with the base v1.4 model.
The same can be done with textual inversions, but instead you place them in the “textual_inversion” folder
Thank you for stopping by. If you found this guide helpful, here are a few more articles to consider: