Unconditional DDPM for Face Generation
|
Built with PyTorch |
|
Hosted on Hugging Face |
Sample Visualizations
Model Generations (Sampling)
Reverse Diffusion Trajectory
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()
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support


