Stable Diffusion

From Interaction Station Wiki
Jump to navigation Jump to search

Generating images from a sentence using Stable Diffusion

Stable Diffusion is an AI algorithm developed by CompVis and sponsored primarily by Stability AI, a startup that aims to be the driving-force behind the open-source AI. The algorithm itself builds on ideas from Open AI’s DALL-E 2, Google’s Imagen and other image generation models, with some extra optimizations.

Running Stable Diffusion

At the time of writing, Stable Diffusion (SD) is only installed on the PCs in classroom WH02.110. So find yourself a PC and login to Ubuntu. After you've logged in, open the terminal and enter the following commands to start up SD.

1: Navigate to the SD folder

cd ~/MachineLearning/stable-diffusion-webui

2: Activate the environment

conda activate stable-diffusion

3: Start SD

python launch.py --opt-split-attention --medvram --disable-safe-unpickle

The moment you run the final command, some output will appear within the terminal. At a certain point you will see Running on local URL: http://127.0.0.1:7860. If you open any browser and navigate to this link (or just click the link in the terminal while holding the ctrl key), you will be greeted by the SD interface.

Image sizes

[1:1] Square: --W 512 --H 512
[16:9] Widescreen: --W 1024 --H 576
[9:16] Mobile first (Instagram stories, Snapchat etc): --W 576 --H 1024
[10:16] Portrait: --W 640 --H 1024

Code

Github: https://github.com/mywdka/stable-diffusion

Tools

Dataset explorer: https://knn5.laion.ai (mirror)
Prompt builder: https://promptomania.com/stable-diffusion-prompt-builder/
Img to prompt: https://replicate.com/methexis-inc/img2prompt
Prompt examples: https://lexica.art/
Have I Been Trained: https://haveibeentrained.com/

Community

Discord: http://discord.gg/stablediffusion