Hackable training script for (mostly image) diffusion model (Mostly for educational/research/prototyping purposes)
The roadmap contains a list of stuff I personally interested in.
- OT Flow Matching (velocity prediction)
- Compositional Diffusion
- Score Matching
- Noise Prediction
- DPM Sampling
- DDIM Inversion
- Text-to-Image w/ CLIP & CFG
Open up an issue if you want to help out with any of these features/add features! Accompanying blog posts can be found at Generative and World Models @dibbla.space.
The repo is designed to run with simple torch installation as well as the Hugging Face's datasets library. Make sure .env file is configured with your Hugging Face token.
You can customize the training with additional flags:
--bs(batch size)--epoch(number of epochs)--lr(learning rate)--train_size(resize input image to this size)--sample_steps(steps during generation)--mode(training scheme:otornoise)--device(e.g.,cuda:0orcpu)
Example (training with flow matching):
python train.py --dataset korexyz/celeba-hq-256x256 --mode ot --train_size 64 --epoch 20 --device cuda:0