In this article, we will explore an easier method to install AUTOMATIC1111 Stable Diffusion Web UI directly on Windows Subsystem for Linux (WSL), without the need for Anaconda. This process is straightforward and requires executing a few commands in the Linux terminal.
My Setup
Main OS | Windows 11 Pro |
WSL | Ubuntu 22.04.1 LTS |
GPU | NVIDIA GeForce RTX 3070 8 GB |
SD Web UI | AUTOMATIC1111 |
YouTube Video Tutorial
I recorded this whole process on an example video.
Install Process (Commands)
# Install Ubuntu to WSL (Optional if WSL not installed yet)
wsl --install Ubuntu
# Update distro (Just want to be sure that everything is updated in Ubuntu)
sudo apt-get update
sudo apt-get upgrade
# Install CUDA
sudo apt install nvidia-cuda-toolkit
# Install python
sudo apt install wget git python3 python3-venv
# Fix: Cannot locate TCMalloc (improves CPU memory usage)
sudo apt-get install google-perftools
# Fix error: ImportError: libGL.so.1: cannot open shared object file: No such file or directory
sudo apt-get install python3-opencv
# Install AUTOMATIC1111 with their script (this should download needed missing dependencies)
bash <(wget -qO- https://raw.githubusercontent.com/AUTOMATIC1111/stable-diffusion-webui/master/webui.sh)
# Run AUTOMATIC1111 after successfully installation
./webui.sh
Possible Problems
- Building wheel for pycairo (pyproject.toml) did not run successfully.
- Got this error while installing and using ControlNet
- To fix, just install: sudo apt-get install sox ffmpeg libcairo2 libcairo2-dev
- Fix source: https://github.com/Mikubill/sd-webui-controlnet/issues/1234#issuecomment-1546954082
Useful Links
- https://sakari.niittymaa.com/blog_install-stable-diffusion-web-ui-using-wsl-and-anaconda
- https://linuxhint.com/install-cuda-on-ubuntu-22-04-lts/
- https://pastebin.com/7uzZV5ZS
No comments.