Personal repository for experimenting with flow matching and diffusion models, based on the MIT 6.S184 course.
This repo contains implementations of flow matching and diffusion models for image generation. Currently working on training both models on MNIST, tuning hyperparameters, and exploring the differences between flow and diffusion approaches.
main.py- Main training and inference scriptbase.py- Abstract base classes for models, trainers, and simulatorsmodels.py- Model architectures (U-Net, etc.)probability_paths.py- Probability path implementationssimulators.py- ODE/SDE solversdistributions.py- Distribution implementationsutils.py- Utility functions
python main.py train --num_epochs 5000 --batch_size 250 --checkpoint_path checkpoints/flow_model.pth
python main.py inference --checkpoint_path checkpoints/flow_model.pth --output_path outputs/samples.png
python main.py visualize-path --vis_num_timesteps 5Course materials completed. Currently experimenting with:
- Flow matching models and Diffusion models on FashionMNIST