Recently, I used to use Ubuntu 22.04.02 and Cuda 11.7 and Stable diffusion 1.2.1.
One day, I updated all, and I found that Cuda wouldn't start.
The kernel was updated to 6.
At the same time my SSD was broken.
So I bought new one, and start to find more stable GUI.
Pricisely speaking, I asked Bing about that.
Bing told me that Pop!_OS exists.
It's for gaming and NVIDIA preinstalled.
The base is ubuntu.
This should work for stable diffusion.
I installed Pop!_OS.
it goes.
Download Pop!_OS from System76.
https://pop.system76.com/
Burn pop_os_22.04_amd64_nvidia_33.com in DVD. not USB.
At first place, I used my USB to install Pop_os.
But it didn't work. The installer was trying to refer cdrom/casper/filesystem.manifest-remove which did not exist.
And my usb's one Sector crrupted.
Then install pop!_os.
Ordinary way. Please refer System76 instruction site.
Install Cuda.
sudo apt install nvidia_cuda_toolkit
which nvcc
/usr/bun/nvcc
/usr/bin/nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Thu_Nov_18_09:45:30_PST_2021
Cuda compilation tools, release 11.5, V11.5.119
Build cuda_11.5.r11.5/compiler.30672275_0
install pip
sudo apt install python3-pip
install python-venv
sudo apt install python3.10-venv
Restart Pop!_OS.
install pytorch
pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu115
git clone --depth=1 --branch v1.2.1 https://github.com/AUTOMATIC1111/stable-diffusion-webui
Edit webui-user.sh.
Add
export COMMANDLINE_ARGS="--autolaunch --xformers"
Add
export TORCH_COMMAND="pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu115"
chmod 755 webui-user.sh
bash ./webui-user.sh
execute webui.sh, it will take a few hours when first time.
bash ./webui.sh