How to use from the
Use from the
Diffusers library
pip install -U diffusers transformers accelerate
import torch
from diffusers import DiffusionPipeline

# switch to "mps" for apple devices
pipe = DiffusionPipeline.from_pretrained("1aurent/ddpm-mnist", dtype=torch.bfloat16, device_map="cuda")

prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"
image = pipe(prompt).images[0]

Unconditional MNIST DDPM

Description

This model is a very lightweight UNet2D trained on the MNIST dataset.
This model is unconditional, meaning that you cannot pick which number you'd like to generate.
This model was trained in ~40min on an L4 GPU Google Colab instance. You can see the training logs in the Training metrics tab.

A conditional model is available at 1aurent/ddpm-mnist-conditional, though it is pretty buggy.

Usage

from diffusers import DDPMPipeline

pipeline = DDPMPipeline.from_pretrained('1aurent/ddpm-mnist')
image = pipeline().images[0]
image
Downloads last month
817
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train 1aurent/ddpm-mnist

Space using 1aurent/ddpm-mnist 1