kjsman/stable-diffusion-pytorch
A minimal, readable PyTorch implementation of the Stable Diffusion text-to-image diffusion model.

Velocity · 7d
+0.4
★ / day
Trend
→steady
star history
This repository provides a clean, self-contained PyTorch implementation of Stable Diffusion focused on code readability and minimalism. It implements the core components needed for image generation from text prompts: the variational autoencoder (VAE), CLIP text encoder, UNet with attention mechanisms, and the diffusion sampler. The codebase avoids unnecessary abstractions to keep the implementation hackable and easy to follow.