Skip to content

Minimal implementation of Denoising Diffusion Probabilistic Models (DDPM) in PyTorch.

Notifications You must be signed in to change notification settings

rosikand/ddpm-pytorch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DDPM PyTorch Implementation

This repo contains a work-in-progress implementation of Denoising Diffusion Probabilistic Models (DDPM) in PyTorch.

Usage

import ddpm_pytorch
from ddpm_pytorch import diffusion

diffuser = diffusion.DDPM(
    model=Unet(dim=64), 
    image_shape=(3, 32, 32), 
    trainloader=trainloader, 
    num_time_steps=1000, 
    loss='mse'
)

diffuser.train(num_epochs=100)

generated_image = diffuser.sample(
    model=diffuser.model, 
    num_time_steps=1000, 
    shape=(1,3,32,32)
)

Installation

$ pip install git+https://github.com/rosikand/ddpm-pytorch.git

About

Minimal implementation of Denoising Diffusion Probabilistic Models (DDPM) in PyTorch.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages