/stable-diffusion

Proof of concept of Stable Diffusion image generation

Primary LanguageJupyter Notebook

stable-diffusion

Jupyter Notebook with a proof of concept of Stable Diffusion image generation.

Code will check for GPUs and make use of them if they can.

Supported GPUs:

  • Nvidia (CUDA)
  • Apple M1/M2 (MPS)

Not supported:

  • AMD (MPS) MPS for AMD GPUs does not fully support Stable Diffusion functions

Setup

Pre-requisites

Install Nvidia drivers (If using EC2 instance with GPU (p*, g* instance families)

Instructions here

Hugging Face API Key

Stable Diffusions requires an API key from Hugging Face. Sign up here.

The API key needs to be set as an environmental variable from the CLI or in an .env file in the root directory. CLI:

export HG_TOKEN=<API Key>

.env file:

HG_TOKEN=<API Key>

Installation

python3 -m pip install -r requirements.txt