AUTOMATIC1111/stable-diffusion-webui for Fedora-Based Distros
A guide for NVIDIA and AMD GPUs
Fedora is tailored more towards FOSS software, so there can be some issues when it comes to NVIDIA. I personally use Nobara because it includes tons of compatibility fixes on top of Fedora. In this guide, I'll be using "Nobara" instead of Fedora, as that is where I've tested these changes more thoroughly.
Enable rpmfusion-nonfree in your software center, and then install the latest proprietary NVIDIA drivers. This guide was created with the 555.52.04 driver version.
Stable Diffusion requires Python 3.10, and Nobara has moved beyond this. Use the following command to get the proper version on your system.
sudo dnf install python3.10
Minimal Fedora may not come with some required packages. Make sure you also have pciutils
and gperftools
installed. If you have an AMD gpu, you should also have lspci
.
For easy installation and updates, make sure you have git
installed.
Clone the repository, using the url provided through the official repo or the command below. Make sure you're in the directory (folder) that you want it to be installed in. This will be large, so have plenty of space:
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
The default webui-user.sh
file assumes that the latest version of python will work, which it won't. Open and change line 16 from #python_cmd="python3"
to the following, making sure to save.
python_cmd="python3.10"
Note. This simply tells the program to use python3.10
anywhere it would normally just try python
.
From inside of the cloned stable-diffusion-webui
folder, run the following command to start the program:
./webui.sh
And it's running!
Well, it's going to start downloading the different models it uses as defaults. This could take a bit, so you may as well read the following section while you wait, it'll automatically start when it's done. BTW, it won't have to do this again and starts up pretty quick.
After it's done though, try out the following prompt! It's sort of like a "Hello world!" of image generation
photograph of an astronaut riding a horse