---
license: mit
library_name: pytorch
pipeline_tag: text-to-image
tags:
- pixel-art
- weight-space-programming
- hand-written-weights
- no-training
- tiny-model
- pico-8
- toy
language:
- en
---
# πΉοΈ PixelGen2
**A text-to-pixel-art model with 6,747 parameters. Zero of them were trained.**
Every weight was typed in by hand. It draws 21,866 distinct sprites from 28 templates.
Every sprite above is one prompt: "<colour> <body> with <colour> <accessory>". No gradients were harmed.





---
## What this is
A tiny PyTorch `nn.Module` that turns a prompt like `"red potion"` or `"purple ghost with gold crown"` into a 16Γ16 pixel-art sprite in the PICO-8 palette, upscaled to 128Γ128.
It's an experiment in **weight-space programming**, inspired by [this post](https://rikiyat.github.io/blog/weight-space-programming/): instead of training a network, you write a program and *compile it into weights*. Linear layers become lookup tables, argmax becomes a decision, a 1Γ1 conv becomes a palette. The model is a real `nn.Module` β you can call `.forward()`, save a `state_dict`, load it back β but no optimizer ever touched it.
There are two models in the repo:
| | `PixelGen` (v1) | `PixelGen2` (v2) |
|---|---|---|
| prompt | `"