stable-diffusion-from-scratch
stable-diffusion-from-scratch copied to clipboard
Implementation of Stable Diffusion from scratch [WORK IN PROGRESS]
Implementation of Stable Diffusion
This repository contains Stable Diffusion’s implementation in PyTorch.
Updates
This isn't actually an implementation of stable diffusion from scratch. I cancelled this project and started working on RLHF
Install
pip install -r requirements.txt
pip install -e .
Usage
from PIL import Image
from foundation.stable_diffusion import StableDiffusion
prompt = "holy young female battle robot flying award winning, portrait bust symmetry faded tetrachromacycolors arctic background tim hildebrandt wayne barlowe bruce pennington donato giancola larry elmore masterpiece trending on artstation cinematic composition beautiful lighting hyper detailed!!! 8 k oil on canva"
model = StableDiffusion(n_inference_steps=30)
images = model.generate(prompt)
pil_images = [Image.fromarray(image) for image in images]
pil_images[0]
Paper Reviews
CLIP - Multimodal Neurons
VAE
Variational Autoencoder (VAE) model with KL loss from the paper Auto-Encoding Variational Bayes by Diederik P. Kingma and Max Wellin
UNET
Diffusion Process
Contributing
This repository is still a work in progress.
Currently, no downloads
and no executables are provided.
I welcome many contributors who can help.
License
Licensed under the MIT license.