doggie-diffusion / README.md
williamoverton's picture
Keep dataset link and remove paper citation
2b29c0c verified
|
Raw History Blame Contribute Delete
2.66 kB
---
library_name: pytorch
license: cc0-1.0
datasets:
- rmokady/SDIP_dog
tags:
- diffusion
- ddpm
- unconditional-image-generation
---
# Doggie Diffusion
I wanted to find out how good an image generator could get if I trained it from scratch on a single older consumer GPU. I used an NVIDIA RTX 2080 and gave the model one job: turn seeded noise into a 64×64 RGB image of a dog. No text prompts.
[More information and DEMO available here](https://overton.engineering/projects/doggie-diffusion)
## Samples
The grid shows seeds 0–99, all drawn from the same checkpoint. I used the exponential moving average (EMA) of the dense-skip U-Net's weights at step **50,014**, which is also the checkpoint I exported to ONNX for the browser demo. Some dogs come out sharp enough to see where they're looking. Others are a blur.
![Gallery of 100 generated dog images from seeds 0–99](https://overton.engineering/projects/doggie-diffusion/seeds-0-99.webp)
You can also see the [dog from the denoising video](https://overton.engineering/projects/doggie-diffusion/seed-example.webp).
## Generate with PyTorch
`model.safetensors` holds the original-precision EMA weights for inference.
The optimizer state stays in the training checkpoint.
Open the [pinned PyTorch source](https://github.com/williamoverton/models-from-scratch/tree/eaf9e240453356d3fd86fd9190f7bb023142ff83/src/doggie-diffusion). With `uv` and a CUDA-capable NVIDIA GPU, download the weights and run this from the source repository root:
```bash
uv run --package doggie-diffusion doggie-diffusion-generate \
/path/to/model.safetensors --seed 19 --output dog.png
```
Seed 19 produces `dog.png` after 1,000 denoising steps with the cosine DDPM sampler. No dataset or dashboard needed. The U-Net takes the current timestep as input, uses block-level skip connections, and applies spatial self-attention at 16×16 and 8×8.
## Training data and limitations
I resized all 126,841 images in [SDIP Dogs](https://huggingface.co/datasets/rmokady/SDIP_dog) to 64×64 RGB for training. This release contains weights and generated examples only.
The grid shows what the model makes across 100 seeds, including distorted faces. I didn't benchmark image quality or measure breed coverage.
## Weights license
I release `model.safetensors` under [CC0 1.0 Universal](https://creativecommons.org/publicdomain/zero/1.0/legalcode).
You can use, modify, and redistribute the weights for any purpose, including commercially, without paying or crediting me.
CC0 covers only the rights I hold in the weights. It does not cover the source code, sample images, or training data, or grant rights held by others.