A basic diffusion model based on the seminal paper by Jonathan Ho et al.
These are a few examples of what this model generated after a lot of debugging.
Find a few trained models and other things on HuggingFace.
Smiling or Not Face Data from Kaggle.
The smiling or not smiling is not relevant to me, I just want to generate a face. I will combine all the categories of faces into one single dataset.
pip install -r requirements.txt
git clone https://huggingface.co/datasets/zrthxn/SmilingOrNot data/faces
unzip data/faces/Archive.zip -d data/faces
python main.py train --dryrun
python main.py train \
--timesteps 500 \
--batch_size 64 \
--lr 0.01 \
--epochs 500 \
--device cuda
python main.py test \
--model trained_500e.pt \
--ns_path scheduler.json \
--output_dir . \
--device mps
Papers
- Denoising Diffusion Probabilistic Models
- Deep Unsupervised Learning using Nonequilibrium Thermodynamics
- Improved Denoising Diffusion Probabilistic Models
Videos and Code