Everything Stable Diffusion
A latent text-to-image diffusion model.
You'll find here different installation instructions for different git repositories
- Basic StableDiffusion
- Different versions of StableDiffusion
- Installation: Stable Diffusion Web UI by Automatic1111 (+ Deforum Extension)
- Installation: ComfyUI
- Installation: Deforum Stable Diffusion
- Helpful Links
Basic StableDiffusion
here you will find the normal StableDiffusion install guide
Stable Diffusion
Stable Diffusion version 2.1
stable diffusion v-2-1 768x768
wget --no-check-certificate --content-disposition https://th-koeln.sciebo.de/s/m3PhfQtlmYOlEUI/download -O v2-1_768-ema-pruned.ckpt
stable diffusion v-2-1 512x512 (base)
wget --no-check-certificate --content-disposition https://th-koeln.sciebo.de/s/Kpgz0TueJYcjY4t/download -O v2-1_512-ema-pruned.ckpt
MIDAS (Depth prediction)
wget --no-check-certificate --content-disposition https://th-koeln.sciebo.de/s/qzm306xfHdTm9Jk/download -O dpt_large-midas-2f21e586.pt
NYU AdaBins
wget --no-check-certificate --content-disposition https://th-koeln.sciebo.de/s/fTpi3vOXrNWhvK1/download -O AdaBins_nyu.pt
Stable Diffusion with depth2image
stable diffusion depth ema
wget --no-check-certificate --content-disposition https://th-koeln.sciebo.de/s/cOU4j8ZXa65Pmql/download -O 512-depth-ema.ckpt
dpt hybrid MidaS
- should be placed in a folder named midas_models
wget --no-check-certificate --content-disposition https://th-koeln.sciebo.de/s/Ju8NlHuNDMFQ8SP/download -O dpt_hybrid-midas-501f0c75.pt
Stable Diffusion v1
🌟ProtoGen 3.4 🌟
wget --no-check-certificate --content-disposition https://th-koeln.sciebo.de/s/2MTmmPTeuSu20MY/download -O ProtoGen_X3.4.ckpt
Stable Diffusion v 1.5 pruned emanoly
wget --no-check-certificate --content-disposition https://th-koeln.sciebo.de/s/LwN49UHfYkVH2zE/download -O v1-5-pruned-emaonly.ckpt
Upscaling
x4-upscaler-ema.ckpt
wget --no-check-certificate --content-disposition https://th-koeln.sciebo.de/s/QmvMgK31iSQ4MS1/download -O x4-upscaler-ema.ckpt
Different versions of StableDiffusion
there are various sub git repositories for StableDiffusion, for example WebUi, ComfyUi, ...
you will find them here
Installation: Stable Diffusion Web UI by Automatic1111 (+ Deforum Extension)
WebUI: Installation
1. Open a terminal
2. Run the following commands in terminal in this order:
Download the stable-diffusion-webui repository
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
Change directory and navigate to the Stable Diffusion folder
cd stable-diffusion-webui/models/Stable-diffusion
3. Download a Stable Diffusion Model from KISD Model Zoo
Downloading ONE version is enough to get you started.
Stable Diffusion v-2-1 512x512 (base)
wget --no-check-certificate --content-disposition https://th-koeln.sciebo.de/s/Kpgz0TueJYcjY4t/download -O v2-1_512-ema-pruned.ckpt
Stable Diffusion v-2-1 768x768
wget --no-check-certificate --content-disposition https://th-koeln.sciebo.de/s/m3PhfQtlmYOlEUI/download -O v2-1_768-ema-pruned.ckpt
4. Change access rights of file webui.sh
Return back to home directory
cd
Change directory and navigate to the stable-diffusion-webui folder
cd stable-diffusion-webui
Run this command to assign execution rights
chmod +x webui.sh
5. Run webui.sh
./webui.sh --share
6. In the terminal code, search for the public URL
(Running on public URL: https:// xxxxxxx-xxxx-xxxx-.gradio.live) and copy it to your browser
7. If you receive the following error message after trying to generate your first image, in the WebUI go to Settings > Stable Diffusion > & check the box for "Upcast cross attention layer to float" > Apply settings & Reload UI
NansException: A tensor with all NaNs was produced in Unet. This could be either because there's not enough precision to represent the picture, or because your video card does not support half type. Try setting the "Upcast cross attention layer to float32" option in Settings > Stable Diffusion or using the --no-half commandline argument to fix this. Use --disable-nan-check commandline argument to disable this check.
8. At end of use: Within the interface, go to File > Hub Control Panel > Stop My Server
Deforum Extention (Animation for SD): Installation
1. Open a terminal & navigate to the stable-diffusion-webui folder
cd stable-diffusion-webui
2. Download the Deforum repository
git clone https://github.com/deforum-art/deforum-for-automatic1111-webui/ extensions/deforum
Tutorial recommendation: Deforum Settings Explained - Part 1 Stable Diffusion Automatic 1111
Tutorial recommendation: Deforum for AUTOMATIC1111 - Stable Diffusion Tutorial - AI Animation Part 2
After Installation: Running Stable Diffusion WebUI
1. Open a terminal & navigate to the stable-diffusion-webui folder
cd stable-diffusion-webui
2. Run webui.sh
./webui.sh --share
3. In the terminal code, search for the public URL
(Running on public URL: https:// xxxxxxx-xxxx-xxxx-.gradio.live) and copy it to your browser
4. At end of use: Within the interface, go to File > Hub Control Panel > Stop My Server
Tutorial recommendation: Stable diffusion tutorial. ULTIMATE guide - everything you need to know!
Please Note: The original version of this book was created by Laura Wagner. This is merely an update of her work!
Installation: ComfyUI
ComfyUI: Installation
1. Open a terminal
2. Run the following commands in terminal in this order
2.1. Download the ComfyUI repository
git clone https://github.com/comfyanonymous/ComfyUI
2.2. Navigate to the "custom_nodes" folder and download the ComfyUI Manager
cd ComfyUI/custom_nodes
git clone https://github.com/ltdrdata/ComfyUI-Manager
3. Navigate to the ComfyUI with Manager notebook and open it:
Path: ComfyUI/custom_nodes/ComfyUI-Manager/notebooks/comfyui_colab_with_manager.ipynb
4. Make following changes to the notebook:
4.1. Disable Google Drive Connection (Set USE_GOOGLE_DRIVE = "False")
Delete:
USE_GOOGLE_DRIVE = True #@param {type:"boolean"}
Paste:
USE_GOOGLE_DRIVE = False #@param {type:"boolean"}
4.2. Change Workspace Location (Set WORKSPACE = '~/ComfyUI')
Delete:
current_dir = !pwd
WORKSPACE = f"{current_dir[0]}/ComfyUI"
Paste:
WORKSPACE = '~/ComfyUI'
5. Make sure the code looks like this, save the notebook changes & run the cell
6. Uncomment the models you want to install (delete the "#" in front of the lines) & run the cell
7. Run the last cell "ComfyUI with cloudflared" and open ComfyUI in the browser
7.1. In the terminal code, search for the URL to access ComfyUI
(https://xxxx-xxxxx-xxxx.trycloudflare.com) and copy it to your browser.
8. At end of use: stop your server (important)!
File > Hub Control Panel > Stop My ServerDeforum Extention (Animation for SD): Installation
Tutorial recommendation: Olivio Sarikas - Learn ComfyUI Playlist (1 - 8)
Installation: Deforum Stable Diffusion
Installation
Installing DSD locally on a Linux Device
1. clone this repository:
git clone https://github.com/HelixNGC7293/DeforumStableDiffusionLocal.git
Creating the environment
2. in case the environment should be available permanently (yes)
conda config --add envs_dirs /home/jovyan/.conda_envs
3. create environment with conda
conda create --name dsd python=3.8.5 -y
4. initialize bash shell
conda init bash
5. restart shell
source ~/.bashrc
6. activate environment:
conda activate dsd
Downloading models
cd into models folder
cd models
Download model files
wget --no-check-certificate --content-disposition https://th-koeln.sciebo.de/s/QJJm0HoP5JqMYza/download -O sd-v1-4.ckpt
wget --no-check-certificate https://th-koeln.sciebo.de/s/e9GlUImXPvTtJRP/download -O dpt_large-midas-2f21e586.pt
cd ..
cd pretrained
download adaBins
wget --no-check-certificate --content-disposition https://th-koeln.sciebo.de/s/yYEhjskz9yuKotX/download -O AdaBins_nyu.pt
cd ..
Making the installations
cd DeforumStableDiffusionLocal
python setup.py
Prompting the Model (Latest Stable Diffusion Weights)
These steps need to be executed in order to activate the environment we installed before
initialize bash shell
conda init bash
restart shell
source ~/.bashrc
then:
conda activate dsd
generate still images:
python run.py --settings "./examples/runSettings_StillImages.txt"
animation:
python run.py --enable_animation_mode --settings "./examples/runSettings_Animation.txt"
installation script
git clone https://github.com/HelixNGC7293/DeforumStableDiffusionLocal.git
conda config --add envs_dirs /home/jovyan/.conda_envs
conda create --name dsd python=3.8.5 -y
cd DeforumStableDiffusionLocal
cd models
wget ##############insert adabins
wget --no-check-certificate --content-disposition https://th-koeln.sciebo.de/s/QJJm0HoP5JqMYza/download -O sd-v1-4.ckpt
wget --no-check-certificate https://th-koeln.sciebo.de/s/e9GlUImXPvTtJRP/download -O dpt_large-midas-2f21e586.pt
cd ..
conda init bash
source ~/.bashrc
conda activate dsd
python setup.py
Downloading entire folders
if you want to download an entire folder you need to zip it first:
zip -r example.zip original_folder
Upscaling
For upscaling please refer to the ESRGAN Book
https://github.com/xinntao/Real-ESRGAN
-i INPUTPATH
-o OUTPUTPATH
-n MODEL
Helpful Links
a collection of different useful links
Prompt search engine - find good prompts