Skip to content

vsey/DDPM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stable Implementation in PyTorch using Lightning

This repository contains an implementation of Stable Diffusion inspired by the paper 'High-Resolution Image Synthesis with Latent Diffusion Models'. As this project is for educational purposes, I have implemented the VQ-GAN, CLIP-Encoder and U-Net models from scratch. The model was trained on the Pixel Art dataset, as it contains small images that are still high-quality. I chose Stable Diffusion as it is a good model for learning generative models. This is because it uses GANs, variational autoencoders, attention and transformer encoders (for CLIP), as well as diffusion.


Sample Output VQ-GAN

Sample Output Stable Diffusion

The classes used for generating this output from left to right are: Human_Front, Fruit, Animal, Human_Front, Item


Newly Learned tools

As this project is primarily for educational purposes, I wanted to briefly reflect on the new technologies I learned

1. UV

The first time I used UV, I used it to manage the project's dependencies and Python environments. Before that, I always used Mambaforge, but I noticed that UV is faster and more manageable, as it uses a project.toml file to manage the entire project, which I found to be a much nicer way. Also that it uses the normal pip repos instead of the conda ones is an added bonus.

2. Open Source Contributions

I used a computer with limited storage capacity and attempted to train my VQ-GAN on larger images. Unfortunately, the training process did not complete successfully, resulting in the loss of all progress. Having noticed that it would be beneficial if Pytorch Lightning checkpoint callbacks could save checkpoints in the event of exceptions, I have taken the initiative in contributing this feature.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published