ylecun/mnist
Viewer • Updated • 70k • 78.9k • 244
How to use manoela/ddpm-mnist with Diffusers:
pip install -U diffusers transformers accelerate
import torch
from diffusers import DiffusionPipeline
# switch to "mps" for apple devices
pipe = DiffusionPipeline.from_pretrained("manoela/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]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.
from diffusers import DDPMPipeline
pipeline = DDPMPipeline.from_pretrained('1aurent/ddpm-mnist')
image = pipeline().images[0]
image