Somewhere out there, a PDF file is quietly doing the thing that used to demand a small datacenter: generating pictures. Not well, mind you. The file itself is refreshingly honest about this, advertising right up top that it "generates Sh*tty Images."
Meet diffusion.pdf, the odd little creation of Alex Van Doren, a Hack Club Stardance developer and incoming freshman at Brown University. It is a PDF file with a full denoising diffusion image model embedded directly inside it. That is the same family of technology that powers Stable Diffusion, Midjourney and DALL-E, squeezed into the file format most of us associate with tax forms, unread warranties and PDFs we definitely opened that one time.
How you get a diffusion model into a PDF (and why)
The story starts, as so many good tech stories do, with a dare. Van Doren had already made "slop pdf," a PDF that spits out random AI slop stories when you open it. While showing it off, a friend suggested he take the next step and get an actual language model running inside the PDF, no API calls, no cloud, no cheat codes.
Van Doren laughed at the idea. Then he did some research and found Evan Zhou's llm.pdf, a project that runs an LLM completely inside a PDF file. Since that already existed, he did not want to waste his time rebuilding it. So instead he pivoted to something even more cursed: a full diffusion image model, living its best life inside a document reader.
With help from Claude, he forked the llm.pdf repository, hacked at it, and eventually emerged with a working diffusion model embedded in a 75 MB PDF. That file size comes with an apology baked into the requirements page: "sorry it's such a big file."
The specs, or: how bad is it, exactly
The model is a 55,403,136-parameter int8 denoising diffusion network, which sounds intimidating until you read the rest of the spec sheet:
- Vocabulary: 131 doodle categories
- Quality: 0.874 class accuracy
- Output: ASCII art rendered in 28 rows of text
- Noise source: whatever time it is right now
That last one is honestly the most charming detail. Since a PDF cannot easily pull random noise from anywhere else, the model seeds itself with the current time, which Van Doren calls "legit the only way to get something noisy from a pdf."
The model was trained on Google's Quick Draw dataset of doodles, covering roughly 130 categories, with about 327,500 drawings over 45 epochs. It was trained on a MacBook Air, which the maker notes took "so so long." The result: if you ask for something it knows, you get a vaguely recognisable doodle. If you ask for something it does not know, it attempts to map your prompt onto one of its 131 known objects. Terribly.
It renders its masterpieces as blocks of ASCII art instead of actual pixels because, given the nature of PDF form fields, text was simply easier. The output is also inverted so it reads nicely against a white background. Is it fast? It takes about 1.8 seconds per step on an M5 MacBook Air in Chrome, roughly 15.3 seconds per generated image. Not exactly a GPU cluster moment.
So is this AI?
Van Doren has thought about this, because of course he has. Technically, yes: it is a denoising diffusion model, structurally similar to Stable Diffusion, Midjourney or DALL-E. Practically, it is "like way worse." There is something oddly endearing about a maker being this candid about his own creation's shortcomings.
There is also a small compatibility wall. You need Chrome or any Chromium-based browser, and there is a pointed "plz note" that Safari and Firefox are not supported. And you need the aforementioned 75 MB of storage. Small ask, really, for a file that contains an entire image-generating neural network.
Zooming out, the whole thing is a tiny monument to how ludicrously far local AI has come. We have gone from needing racks of GPUs to watching a glorified document renderer fumble through doodles in your browser tab, complete with all the jank and personality you would expect. It is inefficient, it is slow, and it only sort of works, which somehow makes it more impressive, not less.
So the next time someone tells you diffusion models need serious hardware, send them a PDF. A 55-million-parameter picture machine now lives in the most boring file format known to humanity, and it is doing its absolute best.
Comments