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.
- Nvidia (CUDA)
- Apple M1/M2 (MPS)
- AMD (MPS) MPS for AMD GPUs does not fully support Stable Diffusion functions
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>
python3 -m pip install -r requirements.txt