painting trash pandas with my git log
a raccoon a day
Contrary to popular belief, I do not need a generative model in my life. I do, however, have a long-lasting affliction with the idea that there should definitely be a raccoon per day to describe my day, every day.
I planned to do something similar to this since high school, when I first took my foray into GANs (generative adversarial networks), but I put it off so long that even now I've probably spent more time writing this article than I have actually implementing the thing.
the plan is simple: summarize my day's activity as all my recent commits on github (that is remarkably close to the complete production of my life believe it or not), hash them wtih today's date, and feed this into a deterministic model that creates raccoons. same day + same history = same raccoon. perfect. my years of dedication at UCSD have prepared me for exactly this moment.
why so small
Most of the diffusion world is busy chasing photorealism with billion-parameter UNets. This is the exact opposite of that. I wanted something I could train end to end on my own laptop, in an afternoon, and I wanted it to run in the abysmally compute-limited environment of github actions. That way I didn't have to spin up a dumb server just to keep refreshing my afternoon side project.
the model is a ~8M parameter U-Net at 64x64:
- 4 resolution levels: 64 → 32 → 16 → 8 → 4
- channel progression: 64 → 128 → 256 → 256
- self-attention at 16x16 and 8x8,
- group norm + silu inside conv blocks with sinusoidal time embeddings
This creates a hilariously efficient inference, only requiring 32mb of RAM. With prices where they are, that's almost an amount I can afford.
training is plain DDPM with a linear beta schedule. inference is DDIM with 50 steps so I'm not waiting around. ~500 raccoon photos scraped via ddg, 100 epochs, about an hour and a half on my m4 pro.
early epochs look like tv static [insert image later] around epoch 30 you get fur-shaped blobs [insert image later] by 50 there's a face in there if you squint. [insert image later]
I was kinda too lazy to keep training, I fell asleep then had to do actual work in the morning. I'm sure I'll get back to it one day or another. it never produces a good raccoon. but it produces today's.