denoising-diffusion-pytorch is a PyTorch library that implements and trains Denoising Diffusion Probabilistic Models using U-Net architectures for 2D image and 1D sequence generation. It provides Unet, GaussianDiffusion, and Trainer classes along with multi-GPU training support via Hugging Face Accelerate.
Project overview
The library covers both 2D image and 1D sequence denoising diffusion workflows with a Trainer class built on Hugging Face Accelerate for multi-GPU training, making it a practical starting point for researchers and AI engineers exploring diffusion-based generative modeling in PyTorch.
Project type
Model Development · Model Runtime · Image & Vision · Infrastructure
Use cases
Coding & Development
Deployment
Refer to project documentation
License
MIT
Best for
AI engineers who need a reusable PyTorch implementation of Denoising Diffusion Probabilistic Models for 2D image or 1D sequence generation
Researchers who want to experiment with U-Net-based diffusion architectures and multi-GPU training in a Python library format
Developers building generative model prototypes who need Trainer classes and diffusion utilities ready to import
Key capabilities
Provides Unet and GaussianDiffusion classes for training denoising diffusion probabilistic models on 2D image data and generating samples.
Equips the Trainer class with Hugging Face Accelerator to perform multi-GPU training via the accelerate CLI.
Provides Unet1D, GaussianDiffusion1D, Trainer1D, and Dataset1D classes for training and sampling from 1D sequence data.
Limitations and risks
Trainer1D does not evaluate the generated samples in any way since the type of data is not known. Users working with 1D sequence data should plan to implement their own evaluation approach.
Getting started
Install the package with pip install denoising_diffusion_pytorch, then instantiate the Unet and GaussianDiffusion classes in Python. Using the API requires Python coding.
Evidence and sources
README: It is a new approach to generative modeling that may
README: $ pip install denoising_diffusion_pytorch
README: from denoising_diffusion_pytorch import Unet, GaussianDiffusion
README: Or, if you simply want to pass in a folder name and the desired image dimensions, you can use the `Trainer` class to easily train a model.
README: You can easily do multi-gpu training in two steps using their `accelerate` CLI
AI Search
Find projects, verify facts, compare options, or turn a complex need into an actionable plan
Try a searchA click only fills the search box; you stay in control