gbadiff

A diffusion model sized for the Game Boy Advance. It draws a 96×96 butterfly from random noise, shown here on a simulated GBA screen and computed in your browser with the same int8 weights the cartridge will hold.

Screen
Speed
Show each step
Loading the model (29 MB)…
240×160GBA screen, 15-bit color
30.1Mint8 weights
28.8 MBfits a 32 MB cartridge
~61 sper drawing on a GBA, estimated

What is this?

Two small networks. A denoiser runs 16 DDIM steps in a latent space of 256 numbers, and a decoder turns that latent into a 96×96 color image. Their weights are stored as 8-bit integers so they fit in a GBA cartridge. On this page the same int8 weights run with WebGPU, or plain JavaScript where WebGPU is missing.

A GBA has an ARM7TDMI at 16.78 MHz and no floating point. We measured the integer inner loop in the mGBA emulator at 4.75 cycles per multiply-add on dense input, and less where inputs are zero. That puts one drawing at about a minute when every step is shown. Real GBA speed paces this page to that estimate.

How the screen is simulated

Status

Work in progress. The cartridge build isn't finished: the GBA time is an estimate from the measured kernel, and the ROM will also round the activations to integers, so its drawings will differ slightly. The model is a test model trained on 9,213 photos of Smithsonian butterfly specimens. Some drawings come out as grey cards with a ruler, because the photos include those too.