Skip to content

Instantly share code, notes, and snippets.

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 garystafford/db0b8eccbcb24996b18756ad1f633f3e to your computer and use it in GitHub Desktop.
Save garystafford/db0b8eccbcb24996b18756ad1f633f3e to your computer and use it in GitHub Desktop.
# For use with AUTOMATIC1111 on Ubuntu
# current install:
# version: v1.8.0
# python: 3.10.12
# torch: 2.1.2+cu121
# xformers: 0.0.25.post1+cu118
# gradio: 3.41.2
# checkpoint: 6ce0161689
# a1111 install
# https://github.com/AUTOMATIC1111/stable-diffusion-webuihttps://github.com/AUTOMATIC1111/stable-diffusion-webui
# Debian-based:
sudo apt install wget git python3 python3-venv libgl1 libglib2.0-0
# https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Install-and-Run-on-NVidia-GPUs#linux
sudo apt install git python3.10-venv -y
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui && cd stable-diffusion-webui
python3.10 -m venv venv
# Got following error when not installed with DreamBooth plugin update 2023-12-23
# https://askubuntu.com/questions/786994/how-to-find-the-path-for-libcudart-so
# libcusparse.so.11: cannot open shared object file: No such file or directory
# CUDA SETUP: Problem: The main issue seems to be that the main CUDA runtime library was not detected.
# CUDA SETUP: Solution 1: To solve the issue the libcudart.so location needs to be added to the LD_LIBRARY_PATH variable
sudo apt install nvidia-cuda-toolkit
# install requirements for DreamBooth extension (got errors when not installed with plugin)
source venv/bin/activate
pip install diffusers["torch"] transformers discord-webhook
# install xformers for DreamBooth class images (got errors when not installed with plugin)
# https://github.com/facebookresearch/xformers
# get cuda version - 11 or 12? I have 11.5
nvcc --version
source venv/bin/activate
pip install -U xformers --index-url https://download.pytorch.org/whl/cu118
python -m xformers.info
# prevent startup error: "Cannot locate TCMalloc (improves CPU memory usage)"
# https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/10117#issuecomment-1536437860
sudo apt install --no-install-recommends google-perftools
# from terminal:
# A tensor with all NaNs was produced in VAE.
# Web UI will now convert VAE into 32-bit float and retry.
# To disable this behavior, disable the 'Automatically revert VAE to 32-bit floats' setting.
# To always start with 32-bit VAE, use --no-half-vae commandline flag.
./webui.sh --xformers --no-half-vae
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment