A from-scratch denoising diffusion probabilistic model (DDPM) that
unconditionally generates 128×128 deep-sky astronomical images — nebulae,
galaxies, and star clusters. Every pixel is generated; nothing is retrieved or
composited.
Everything is hand-written PyTorch — the U-Net, the noise schedules, the forward
process, the training loop, and both samplers. No diffusers dependency.
Data: 159,462 curated 256px crops (3.8 GB) from public ESA/Hubble,
ESA/Webb, ESO, and NASA imagery. Heavy multi-stage curation (title/AVM-type
blacklists, perceptual-hash dedup, brightness/spectra pruning, a CLIP
zero-shot pass) removes charts, diagrams, and duplicates to near-zero
contamination. Augmented at train time with the full dihedral group (a free 8×
from rotations + flips, all physically valid for deep-sky images).
Objective: simple ε-prediction MSE at uniformly sampled timesteps.
Run: 200,000 steps, batch size 32, single RTX 4090, ~22 h (~2.48 it/s),
~$18. Adam, linear warmup + cosine LR decay 1e-4 → 1e-5, EMA 0.9999, gradient
clipping, bf16 autocast. Final loss ≈ 0.01–0.05.
The model learns genuine astronomical structure on its own: point stars sharpen
into crisp cores, dust lanes cut across edge-on galaxies, globular clusters
resolve into thousands of colored points, and bright stars even grow the
four-pointed diffraction spikes characteristic of Hubble's optics — learned
purely from data, never hard-coded.
Intended use & limitations
Intended for research, education, and art: exploring how a small,
from-scratch diffusion model behaves, and generating decorative astronomical
imagery.
Not for scientific use. Outputs are hallucinated — they resemble real
deep-sky objects statistically but depict nothing real. They must not be used as
astronomical data, measurements, or evidence.
Limitations:
Fixed 128×128 resolution; unconditional (no text or class control).
The output distribution mirrors the curated dataset's aesthetic (Hubble/Webb/
ESO/NASA press imagery), so it inherits that visual bias.
A minority of samples are flat, noisy, or structurally incoherent — expected at
this scale and step count.
License & attribution
Weights and samples are released under CC BY 4.0. Training data derives from:
ESA/Hubble (esahubble.org) — CC BY 4.0
ESA/Webb (esawebb.org) — CC BY 4.0
ESO (eso.org) — CC BY 4.0
NASA Image and Video Library (images.nasa.gov) — public domain
Per-image credits are preserved in data/crops256/manifest.csv in the
code repository. If you publish
samples or weights, please retain this attribution.