CoolFace
Apppublic

novelkathor/DDIM_Image_Generation

sourceHugging Faceupdated 5mo agoView on Hugging Face
0likes
App README

DDIM Face Generation

A Denoising Diffusion Implicit Model (DDIM) trained from scratch on 30,000 faces from the CelebA-HQ dataset. Built entirely in PyTorch — no pretrained components, no diffusers library.

Demo features

  • Generate — sample new human faces from pure Gaussian noise in 20 steps
  • Trajectory — animated GIF showing the full denoising path (noise → face)
  • Interpolate — smooth slerp blend between two independently sampled faces
  • How it works — full architecture and training details at the bottom of the page

Technical details

ArchitectureU-Net with sinusoidal time embeddings + multi-head self-attention
Channels[64, 128, 256, 256]
Parameters25.6M
DatasetCelebA-HQ (30k faces, 64×64)
Training100 epochs, ~14 hours, Apple Silicon MPS
SamplerDDIM — 20 steps vs DDPM 1000 steps (50× speedup)
Noise scheduleLinear β: 1×10⁻⁴ → 0.02, T=1000
Inference weightsEMA (exponential moving average of training weights)

Built from scratch

Every component is hand-written: attention.py · unet.py · diffusion.py · dataset.py · train.py

Source code

github.com/Gh-Novel/DDIM_Image_Generation