Unconditional DDPM for Face Generation


PyTorch Framework

Built with PyTorch
Google Colab

Open Notebook
Hugging Face

Hosted on Hugging Face

Sample Visualizations

Model Generations (Sampling)

Generated Samples

Reverse Diffusion Trajectory

Reverse Process Timeline

Reverse Process Timeline


Code to Run Inference

import matplotlib.pyplot as plt
from huggingface_hub import hf_hub_download
import torch

repo_id = "SavirD/ddpm-unconditional-faces-64x64"

hf_hub_download(repo_id=repo_id, filename="model.py", local_dir=".")
hf_hub_download(repo_id=repo_id, filename="pipeline.py", local_dir=".")
weights_path = hf_hub_download(repo_id=repo_id, filename="model_epoch_50.pth")

from pipeline import DDPMFacePipeline

pipeline = DDPMFacePipeline(checkpoint_path=weights_path)
images = pipeline.generate(num_samples=4)

fig, axes = plt.subplots(1, 4, figsize=(12, 3))
for idx, ax in enumerate(axes):
    ax.imshow(images[idx])
    ax.axis('off')
plt.suptitle("Faces via Unconditional DDPM", fontsize=14)
plt.show()
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support