Metrix187 demonstrates a 16×16 diffusion sprite generator written entirely in CSS
state: expiredheat: lowuncertainty: mediumrelevance: mediumbrowser-ai diffusion-models creative-toolsMetrix187
What is this?
Metrix187’s diffusion.css is a browser demo, shared on Hacker News on Nov. 9, 2026, that generates 16×16 sprites using CSS alone. Its project page says the stylesheet encodes 202,863 integer weights from 11 small neural networks trained on ten hand-drawn sprites recolored to random hues. It describes 12 unrolled DDIM sampling steps, with CSS custom properties doing the computation; the page reports 5.2 MB of CSS and no JavaScript, WebAssembly, or image assets. The author links source code, training code, and a Python reference sampler. The supplied evidence is the project page and a Show HN post; it does not independently establish performance, broader use, or practical production value.
Why it matters
A striking demonstration that browser styling features can encode and execute a tiny generative model, extending CSS beyond presentation into constrained computation. It could inspire playful, self-contained web visuals and experiments in unusual deployment formats, but the sprite resolution, narrow training set, and 5.2 MB stylesheet make this a proof of concept rather than evidence of a practical alternative to conventional browser ML.
Current assessment
New: Metrix187 published diffusion.css, a CSS-only diffusion demo, linked from a Hacker News Show post dated Nov. 9, 2026. According to the project page, it uses 11 small networks trained on ten hand-drawn sprites recolored to random hues; 202,863 weights are embedded as integer literals in CSS calculations. It reports 12 DDIM steps, 12,518 integer custom-property registers, and generation of 16×16 sprites from changing seeds. The author says a Python reference sampler produces identical pixels for the same seed and that the source, training code, and reference sampler are available; these are project claims, not independently verified here. The page says the demo requires support for `:has()` and recommends current Chrome, Edge, Firefox, or Safari. Significance is chiefly technical and creative: it shows CSS primitives can implement a tightly bounded generative computation without JavaScript or WebAssembly. It does not show that CSS is efficient or suitable for general-purpose inference; the model is small and specialized, and the stylesheet is 5.2 MB. The supplied web results offer no independent coverage or adoption evidence.
Measured heat
now 0 pts/hpeak 0 pts/hcomments 0/hpeers p23momentum: steady2 platformsage 336h
points/hour across evidence · reading as of 2026-11-23 15:25:21.381272+11:00 · deterministic, not a model opinion
How the heat travelled
Evidence (2) — ⭐ canonical anchor
| source | object | author | score | comments |
| 🟧 hn | Show HN: A diffusion model that runs in pure CSS, no JavaScriptRetrieved article excerptOpen article · Retrieved 2026-11-09T04:24:01.246155+00:00 # diffusion.css
A diffusion model that runs entirely in CSS.
No JavaScript, no WebAssembly, no images. Press the button: the stylesheet freezes a seed, turns it into noise, and denoises that into a 16×16 sprite in 12 steps.
This browser lacks `:has()`, which the page needs. Try a current Chrome, Edge, Firefox or Safari.
replay
- **202,863**weights
- **12**sampler steps
- **5.2 MB**of CSS
- **0**lines of JS
## How it works
1. **Seed.** An `@property` integer counts up inside a keyframe animation. Ticking the
hidden checkbox pauses it, so the moment you press is the random seed.
2. **Noise.** Each of the 768 pixel channels hashes that seed with `mod()` and sums four
draws into roughly Gaussian noise. That is the static on screen before you press.
3. **Model.** 11 small neural networks, one per noise level, trained in PyTorch on ten
hand-drawn sprites recoloured to random hues, then pruned and rounded to integers. All
202,863 weights are written out as literals inside `calc()`.
4. **Sampling.** 12 DDIM steps, unrolled. Every intermediate value is its own
`@property` `<integer>` register, 12,518 in all, so the
browser computes each once and rounds it.
5. **Timeline.** One `@keyframes` rule points the 256 pixel elements at each sampler
state in turn. Nothing is pre-rendered: a different seed gives a different sprite and colour.
6. **Check it.** View source. There is no `<script>`, and a Python reference using
the same integer arithmetic produces identical pixels for the same seed.
[Source, training code and a reference sampler](https://github.com/Metrix187/diffusion.css) | quantara | 2 | 0 |
| 🟧 echo.github ⭐ | The repository is the original source and contains the implementation, training code, model checkpoint, and README. It describes itself as “ | Metrix187 (GitHub account; identity not further established) | — | — |
Interpretation history
2026-11-09T04:24:28Z
audience grounding: medium — A striking demonstration that browser styling features can encode and execute a tiny generative model, extending CSS beyond presentation into constrained computation. It could inspire playful, self-contained web visuals and experiments in unusual deployment formats, but the sprite resolution, narrow training set, and 5.2 MB stylesheet make this a proof of concept rather than evidence of a practical alternative to conventional browser ML.
Decision trace
- 11-23 16:20expireexpired deterministically: single-evidence seed quiet 14 days (lifecycle)
- 11-09 15:25attention_candidatecreate
- 11-09 15:25promote_anchororigin walk conf 0.94
- 11-09 15:24groundA striking demonstration that browser styling features can encode and execute a tiny generative model, extending CSS beyond presentation into constrained computation. It could inspire playful, self-co
- 11-09 15:24createThe page describes a concrete, technically unusual generative demo, though its tiny sprite output and limited training scope constrain its practical reach.