Skip to content

Instantly share code, notes, and snippets.

@numpde
Last active January 19, 2023 12:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save numpde/7101153795a78623646fbf611b4cf4a6 to your computer and use it in GitHub Desktop.
Save numpde/7101153795a78623646fbf611b4cf4a6 to your computer and use it in GitHub Desktop.
Settings for the SD server (CPU)
#!/bin/bash
# MODIFIED FROM
# https://raw.githubusercontent.com/AUTOMATIC1111/stable-diffusion-webui/master/webui-user.sh
# Install directory without trailing slash
install_dir="/home/$(whoami)/apps/1111"
# Name of the subdirectory
clone_dir="sd-webui"
# Commandline arguments for webui.py, for example: export COMMANDLINE_ARGS="--medvram --opt-split-attention"
export COMMANDLINE_ARGS="--skip-torch-cuda-test --use-cpu all --share --listen --no-half ${WEBUI_API}"
# python3 executable
python_cmd="python3.10"
# git executable
export GIT="git"
# python3 venv without trailing slash (defaults to ${install_dir}/${clone_dir}/venv)
venv_dir="venv"
# script to launch to start the app
export LAUNCH_SCRIPT="launch.py"
# install command for torch
export TORCH_COMMAND="pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu
"
# Requirements file to use for stable-diffusion-webui
export REQS_FILE="requirements.txt"
# Fixed git repos
#export K_DIFFUSION_PACKAGE=""
#export GFPGAN_PACKAGE=""
# Fixed git commits
#export STABLE_DIFFUSION_COMMIT_HASH=""
#export TAMING_TRANSFORMERS_COMMIT_HASH=""
#export CODEFORMER_COMMIT_HASH=""
#export BLIP_COMMIT_HASH=""
# Uncomment to enable accelerated launch
#export ACCELERATE="True"
###########################################
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment