|
|
#!/bin/bash |
|
|
|
|
|
|
|
|
sudo apt update && sudo apt upgrade -y |
|
|
|
|
|
|
|
|
sudo apt autoremove -y |
|
|
|
|
|
|
|
|
sudo apt install software-properties-common -y |
|
|
|
|
|
|
|
|
sudo add-apt-repository ppa:deadsnakes/ppa -y |
|
|
|
|
|
|
|
|
sudo apt install python3.10 |
|
|
|
|
|
|
|
|
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui |
|
|
|
|
|
|
|
|
sudo apt install -y google-perftools |
|
|
|
|
|
|
|
|
python --version |
|
|
python3 --version |
|
|
|
|
|
|
|
|
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.8 2 |
|
|
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.10 1 |
|
|
|
|
|
|
|
|
echo 1 | sudo update-alternatives --config python |
|
|
|
|
|
|
|
|
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 2 |
|
|
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1 |
|
|
|
|
|
|
|
|
echo 1 | sudo update-alternatives --config python3 |
|
|
|
|
|
|
|
|
python3 --version |
|
|
python --version |
|
|
|
|
|
|
|
|
sudo apt install python3.10-dev python3.10-venv |
|
|
|
|
|
|
|
|
cd stable-diffusion-webui/ |
|
|
|
|
|
|
|
|
sed -i 's/#export COMMANDLINE_ARGS=""/export COMMANDLINE_ARGS="--xformers"/' webui-user.sh |
|
|
|
|
|
|
|
|
chmod +x webui-user.sh |
|
|
|
|
|
|
|
|
./webui-user.sh |
|
|
|