Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cloneofsimo/minDiffusion
Self-contained, minimalistic implementation of diffusion models with Pytorch.
https://github.com/cloneofsimo/minDiffusion
diffusion pytorch
Last synced: 11 days ago
JSON representation
Self-contained, minimalistic implementation of diffusion models with Pytorch.
- Host: GitHub
- URL: https://github.com/cloneofsimo/minDiffusion
- Owner: cloneofsimo
- Created: 2022-04-14T20:36:50.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-06-28T18:33:35.000Z (over 2 years ago)
- Last Synced: 2024-08-01T16:51:24.745Z (3 months ago)
- Topics: diffusion, pytorch
- Language: Python
- Homepage:
- Size: 3.51 MB
- Stars: 811
- Watchers: 9
- Forks: 111
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# minDiffusion
Goal of this educational repository is to provide a self-contained, minimalistic implementation of diffusion models using Pytorch.
Many implementations of diffusion models can be a bit overwhelming. Here, `superminddpm` : under 200 lines of code, fully self contained implementation of DDPM with Pytorch is a good starting point for anyone who wants to get started with Denoising Diffusion Models, without having to spend time on the details.
Simply:
```
$ python superminddpm.py
```Above script is self-contained. (Of course, you need to have pytorch and torchvision installed. Latest version should suffice. We do not use any cutting edge features.)
If you want to use the bit more refactored code, that runs CIFAR10 dataset:
```
$ python train_cifar10.py
```
Above result took about 2 hours of training on single 3090 GPU. Top 8 images are generated, bottom 8 are ground truth.
Here is another example, trained on 100 epochs (about 1.5 hours)
Currently has:
- [x] Tiny implementation of DDPM
- [x] MNIST, CIFAR dataset.
- [x] Simple unet structure. + Simple Time embeddings.
- [x] CelebA dataset.TODOS
- [ ] DDIM
- [ ] Classifier Guidance
- [ ] Multimodality# Updates!
- Using more parameter yields better result for MNIST.
- More comments in superminddpm.py