Last active
July 29, 2023 20:24
-
-
Save cwpearson/830dec179d506ae1f62c2d89b9eef03b to your computer and use it in GitHub Desktop.
Install AUTOMATIC1111 on GCE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install some useful stuff | |
sudo apt install -y htop | |
# On Debian 11 this brings python 3.9, but the docs ask for python 3.10.6 | |
sudo apt install -y wget git python3 python3-venv | |
# install pyenv for newer pythons | |
curl https://pyenv.run | bash | |
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc | |
echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc | |
echo 'eval "$(pyenv init -)"' >> ~/.bashrc | |
echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc | |
exec bash | |
# install python build deps | |
sudo apt install -y build-essential libssl-dev zlib1g-dev \ | |
libbz2-dev libreadline-dev libsqlite3-dev curl \ | |
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev | |
nice -n 20 pyenv install 3.10.6 | |
mkdir stable-diffusion-webgui | |
cd stable-diffusion-webgui | |
pyenv local 3.10.6 | |
bash <(wget -qO- https://raw.githubusercontent.com/AUTOMATIC1111/stable-diffusion-webui/master/webui.sh) | |
source stable-diffusion-webui/venv/bin/activate | |
# this may not be necessary | |
pip install -r stable-diffusion-webui/requirements_versions.txt | |
# https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Command-Line-Arguments-and-Settings | |
stable-diffusion-webui/webui.sh --use-cpu all --precision full --no-half --skip-torch-cuda-test --listen | |
# Add Realistic Vision v4.0 | |
# This downloads the file, and I think reuses the yaml config for SD v1 | |
cd stable-diffusion-webui/models/StableDiffusion | |
wget -L https://huggingface.co/SG161222/Realistic_Vision_V4.0/resolve/main/Realistic_Vision_V4.0.ckpt | |
vim stable-diffusion-webui/config/ | |
cp configs/v1-inference.yaml models/Stable-diffusion/Realistic_Vision_V4.0.yaml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment