Automatic1111 install Ubuntu WSL2 on Windows 11



Automatic1111 install Ubuntu WSL2 on Windows 11

Automatic1111 install Ubuntu WSL2 on Windows 11

This video explains how to install vlad automatic in WSL2. The advantage of WSL2 is that you can export the OS image and if something goes wrong or simply doesn’t work, you can simply reimport it. There is no need for the long installation process. Also, you don’t have to store all your models on the WSL2 OS, because WSL2 (and Linux in general) lets you create file links. You can just put them somewhere central. If you have multiple Stable Diffusion web UIs (like automatic111, vlad automatic, invokeai), you only need to download the model file once. Especially if you have 100GB+ of models, this saves a lot of disk space. WSL2 has some advantages in handling generation starting/initialising, which can save some time if you generate everything in bulk. Vlad automatic has basically automated everything installation-wise. That’s pretty neat. Since I have a GTX 1060 6GB and only 8GB of system RAM, I ran into a few bugs. So in this video I show you how to set the RAM, and also the swap file size for the WSL2 machine. This is useful when you are loading models that have very large file sizes. If you have a question just ask in the comments!
_________________________________________________________________
Commands in Order:
sudo apt-get update && sudo apt-get upgrade -y
sudo apt install software-properties-common -y
sudo add-apt-repository ppa:deadsnakes/ppa -y
“sudo apt install python3.10 python3.10-venv python3-pip git python3.10-tk ffmpeg libsm6 libxext6 libgl1 wget -y”
sudo apt install nvidia-cuda-toolkit -y
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
ls
cd stable-diffusion-webui/
./webui.sh
_________________________________________________________________
Create link:

ln -s /mnt/c/Users/nimda/Desktop/ /home/nimda/stable-diffusion-webui/models/Stable-diffusion/

This creates a file link that points the folder “Stable-diffusion” to “Desktop”.
You can point it towards the location where you download all you stable diffusion models for your web UIs.
_________________________________________________________________
Backup:
wsl –export Ubuntu C:UsersnimdaDesktopubuntu-automatic1111.tar
wsl –import Ubuntu C:WSLUbuntu C:UsersnimdaDesktopubuntu-automatic1111.tar
_________________________________________________________________
#stablediffusion #automatic #wsl2
_________________________________________________________________