Views
No views yet

model.png is not a picture — it is the model.| v0 | v1 | |
|---|---|---|
| Parameters | 202,752 | 23,747 |
model.png | 64×3200 px | 160×149 px (a thumbnail) |
| Output head | 1 weight row per pixel (196K params, 97% of model) | CPPN decoder on (x, y) — resolution-free |
| Resolution | fixed 32×32 | any; native 64×64 |
| Prompt embedding | char-sum (order-blind, collision-heavy) | hashed trigrams + words (FNV-1a), still 0 params |
| Biases | none | yes |
| Weight precision | 8-bit (G channel wasted) | 16-bit (R=high byte, G=low byte) |
| Training data | 6 solid-color swatches | ~20K MS-COCO caption/image pairs |

1prompt string
2 → hashed char-trigram + word embedding (64-dim, deterministic, 0 params)
3 → T1 (80×64)+b → tanh
4 → T2 (64×80)+b → tanh = latent z (64)
5
6for every pixel (x, y):
7 concat(z, fourier features of (x, y)) ← 18 coord dims, freqs 1/2/4/8
8 → D1 (80×82)+b → tanh
9 → D2 (80×80)+b → tanh
10 → D3 (3×80)+b → sigmoid = RGB--res 256 works with the same 23,747 weights.model.png (160×149 px).model.png is the canonical model — training writes to it directly. For
tooling that expects standard weight files, the same 10 tensors are exported as
model.safetensors (23,747 parameters total):python convert_to_safetensors.py # model.png -> model.safetensorsconfig.json
(total_parameters: 23747, full per-layer breakdown) and the safetensors
header metadata (total_parameters, param_breakdown, has_bias,
text_encoder_parameters: 0, vae_parameters: 0).eval.md for full method and EVAL_REPRODUCTION.md to re-run:| Metric | v0 | v1 | Tooling |
|---|---|---|---|
| FID ↓ | 566.84 (n=40) | 439.46 (n=5000) | torchmetrics.image.fid.FrechetInceptionDistance |
| CLIP Score ↑ | 18.60 (n=40) | 20.02 (n=5000) | torchmetrics.multimodal.CLIPScore, openai/clip-vit-base-patch32 |
| Native resolution | 32×32 | 64×64 |
sayakpaul/coco-30-val-2014 (256×256
center-crop). Training images are hash-checked to be disjoint from the eval
images.
1# training data (COCO subset)
2python fetch_coco_subset.py --out ../pm-work
3
4# train (writes model.png every epoch)
5python train.py --data ../pm-work/coco_train.npz --epochs 50
6
7# inference from model.png (canonical)
8python main.py "a red double decker bus" --out bus.png
9
10# inference from model.safetensors (standalone, needs only this one file + torch)
11python convert_to_safetensors.py
12python INFERENCE.py "a red double decker bus" --out bus.png
13
14# any resolution from the same 23,747 weights
15python main.py "a beach with palm trees" --res 256 --scale 1
16
17# benchmark eval
18python eval/run_eval.py --work ../pm-work --model model.png --n 5000main.py and INFERENCE.py produce identical output for the same prompt and
resolution.1model.png ← THE MODEL (160×149 px)
2model.safetensors ← same weights, standard format + param metadata
3config.json ← architecture + parameter-count metadata
4main.py ← inference, loads model.png
5INFERENCE.py ← inference, loads model.safetensors (standalone)
6convert_to_safetensors.py ← model.png -> model.safetensors
7train.py ← training
8model.py ← architecture + PNG weight codec
9fetch_coco_subset.py ← builds train/eval data from COCO
10eval/run_eval.py ← FID + CLIP Score via torchmetrics
11eval.md ← benchmark results + method
12EVAL_REPRODUCTION.md ← step-by-step reproduction guide