How to install Stable Diffusion WebUI AUTOMATIC1111 on Linux

Introduction

Stable Diffusion is a deep learning, text-to-image model released in 2022. It is primarily used to generate detailed images conditioned on text descriptions, though it can also be applied to other tasks such as inpainting, outpainting, and generating image-to-image translations guided by a text prompt.

Stable Diffusion web UI is A browser interface based on the Gradio library for Stable Diffusion. We will go through how to install the popular Stable Diffusion software AUTOMATIC1111 on Linux Ubuntu step-by-step. After this tutorial, you can generate AI images on your own PC.

GPU Server Environment

CPU: Dual 12-Core E5-2697v2
GPU: Nvidia RTX 3060 Ti 8GB
RAM: 128GB RAM
240GB SSD + 2TB SSD
OS: Ubuntu 20.04 LTS, Kernel 5.4.0
Check GPU card and driver:
administrator@ubuntu:~$ lspci | grep -i vga
03:00.0 VGA compatible controller: NVIDIA Corporation Device 2486 (rev a1)
05:03.0 VGA compatible controller: Matrox Electronics Systems Ltd. MGA G200eW WPCM450 (rev 0a)
administrator@ubuntu:~$ nvidia-smi
nvidia-smi screenshot

Install Stable Diffusion WebUI

Step 1. Install the Dependencies

# Debian-based:
sudo apt install wget git python3 python3-venv
# Red Hat-based:
sudo dnf install wget git python3
# Arch-based:
sudo pacman -S wget git python3

Step 2. Automatic Installation on Linux

Navigate to the directory you would like the webui to be installed and execute the following command:
bash <(wget -qO- https://raw.githubusercontent.com/AUTOMATIC1111/stable-diffusion-webui/master/webui.sh)

Step 3. Download Stable Diffusion Models

To install a model in AUTOMATIC1111 GUI, download and place the checkpoint (.ckpt) file in the models/Stable-diffusion folder. Go to HuggingFace or Civitai to find a model. Use wget command to download the model:
wget https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned.ckpt
nvidia-smi screenshot

Step 4. Run webui.sh

administrator@ubuntu:~/stable-diffusion/stable-diffusion-webui$ ./webui.sh --xformers --share
nvidia-smi screenshot

Launch Stable Diffusion WebUI

After running webui.sh, it will install all the dependencies. Then a link should pop up, for example, http://127.0.0.1:7860
Running on local URL: http://127.0.0.1:7860
Running on public URL: https://d6127dd33ff0d8bfb6.gradio.live
stable diffusion screenshot

How to Use Stable Diffusion WebUI

Use “Prompts” and “Negative Prompts” to tell AI what to draw.

Test 1

#Prompts: 
eyvind earle disney background art of a beautiful waterfall in a forest
test1 prompt screenshot

Test 2

#Prompts: 
photo of young woman, [Ana de Armas:Emma Watson:0.5], highlight hair, sitting outside restaurant, wearing dress, rim lighting, studio lighting, looking at the camera, dslr, ultra quality, sharp focus, tack sharp, dof, film grain, Fujifilm XT3, crystal clear, 8K UHD, highly detailed glossy eyes, high detailed skin, skin pores
#Negative Prompts: 
disfigured, ugly, bad, immature, cartoon, anime, 3d, painting, b&w
test2 prompt screenshot

Test 3

#Prompts: 
spherical Terrarium, abstract dream, flower, brushes, ivy, foliage, wild, orb, fantasy, complex, gemstone, highly detailed, intricate, elaborate, octane render, 4k HDR, colorful, fractal, black background, eco system, glowing, reflection, crepuscular rays, luminescence
#Negative Prompts: 
monotone, boring, watermark, text, overexposed, simple, minimalist
test2 prompt screenshot

Conclusion

Stable Diffusion stands out among AI art models because you can run it locally on your PC, allowing you to fine-tune the algorithm-generated art until you’re satisfied with the results. If you already have a powerful gaming pc or server, you’re only clicks away from making incredible art anywhere.

GPU Mart offers professional GPU hosting services that are optimized for high-performance computing projects. Here we recommend 4 server plans suitable for running stable diffusion. Please feel free to start your journey boldly, and we are happy to help with any difficulties.

Summer Deal

Advanced GPU-RTX 3060 Ti

167.20/m
20% (Was $209.00)
1m3m12m24m
Order Now
  • 128GB RAM
  • Dual 12-Core E5-2697v2report
  • 240GB SSD + 2TB SSD
  • 100Mbps-1Gbpsreport
  • OS: Windows / Linux
  • GPU: Nvidia GeForce RTX 3060 Tireport
  • Microarchitecture: Ampere
  • Max GPUs: 2report
  • CUDA Cores: 4864
  • GPU Memory: 8GB GDDR6
  • FP32 Performance: 16.2 TFLOPSreport

Advanced GPU-A5000

269.00/m
1m3m12m24m
Order Now
  • 128GB RAM
  • Dual 12-Core E5-2697v2report
  • 240GB SSD + 2TB SSD
  • 100Mbps-1Gbpsreport
  • OS: Windows / Linux
  • GPU: Nvidia RTX A5000report
  • Microarchitecture: Ampere
  • Max GPUs: 2report
  • CUDA Cores: 8192
  • GPU Memory: 24GB GDDR6
  • FP32 Performance: 27.8 TFLOPSreport

Enterprise GPU-A40

369.00/m
1m3m12m24m
Order Now
  • 256GB RAM
  • Dual E5-2697v4report
  • 240GB SSD + 2TB SSD + 2TB NVMe
  • 100Mbps-1Gbpsreport
  • OS: Windows / Linux
  • GPU: Nvidia A40report
  • Microarchitecture: Ampere
  • Max GPUs: 1
  • CUDA Cores: 10,752
  • Tensor Cores: 336
  • GPU Memory: 48GB
  • FP32 Performance: 37.48 TFLOPSreport

Enterprise GPU-V100

369.00/m
1m3m12m24m
Order Now
  • 256GB RAM
  • Dual E5-2697v4report
  • 240GB SSD + 2TB SSD + 2TB NVMe
  • 100Mbps-1Gbpsreport
  • OS: Windows / Linux
  • GPU: Nvidia V100report
  • Microarchitecture: Volta
  • Max GPUs: 1
  • CUDA Cores: 5,120
  • Tensor Cores: 640
  • GPU Memory: 16GB
  • FP32 Performance: 14 TFLOPSreport