This repo contains instructions for training the simple diffusion model described in this blog post.
pip install virtualenv
virtualenv env -p python3
source env/bin/activate
git clone https://github.com/fastai/course22p2.git
cd course22p2
Change pip_requirements
on line 38 in settings.ini
to pip_requirements = torch>=1.7 torcheval diffusers einops timm accelerate ipykernel
pip install -e .
python -m ipykernel install --user --name=env --display-name "simple_diffusion"
Open the simple_diffusion.ipynb
notebook, select the simple_diffusion
environment and run all cells.
Training simple diffusion on Fashion MNIST for 5 epochs takes ~3 minutes on an A100 with 40GB of VRAM.
Here are some example images generated by simple diffusion after 5 epochs of training.