Skip to content

From-scratch implementation of latent diffusion (stable diffusion)

License

Notifications You must be signed in to change notification settings

anenbergb/latent-diffusion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Latent Diffusion (LDM)

This repository provides a from-scratch implementation of latent diffusion model training with the goal of gaining a deeper understanding of diffusion architectures (e.g., U-Net, DiT) and scheduling methods. Both the model and diffusion process are custom-implemented and trained from the ground up. All experiments are constrained to a single NVIDIA RTX 5090 GPU (32 GB VRAM), so the training process is optimized for efficiency under limited compute. The objective is to achieve the highest possible model quality within this constraint.

Work in Progress

This project is currently a work in progress. So far, I’ve trained a baseline Stable Diffusion model using a custom trainer, with custom model and scheduler implementations planned next.

Stable Diffusion - U-Net

Diffusion Transformer (DiT)

Installation

pip install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cu128
pip install -e .

Run Formatting

ruff format llm

Huggingface datasets

Set an alternate location for huggingface home

conda env config vars set HF_HOME=/media/bryan/ssd01/huggingface
conda env config vars list

References

About

From-scratch implementation of latent diffusion (stable diffusion)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages