Last active
June 10, 2024 13:22
-
-
Save garystafford/db0b8eccbcb24996b18756ad1f633f3e to your computer and use it in GitHub Desktop.
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
# For use with AUTOMATIC1111 on Ubuntu | |
# current install 2024-06-10: | |
# version: v1.8.0 | |
# python: 3.10.12 | |
# torch: 2.3.0+cu121 | |
# xformers: 0.0.26.post1 | |
# gradio: 3.41.2 | |
# checkpoint: e6bb9ea85b | |
# 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 | |
# https://github.com/facebookresearch/xformers#installing-xformers | |
# pip install -U xformers --index-url https://download.pytorch.org/whl/cu118 | |
# Updated to resolve xformers errors on 2024-06-10 | |
pip3 install -U xformers --index-url https://download.pytorch.org/whl/cu121 | |
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