Pixie P32
a compact AI model for 32×32 pixel art sprites
2 min readupdated
Created by EmilioSchwaiger, this model generates native 32×32 pixel art sprites with transparent backgrounds from short English text prompts. Unlike standard diffusion models that output high-resolution images requiring downscaling, Pixie P32 is a 66.4M-parameter autoregressive transformer that predicts palette color indices directly across 2×2 patches. For text conditioning, it uses the first 11 layers of the external openai/clip-vit-large-patch14 encoder. It is built for indie game developers and researchers who need rapid prototypes of game icons, items, or creatures without running heavy generators.
Key features
- Native pixel art: generates directly on a 32×32 grid using a 4,097-color palette (index 0 maps to RGBA transparency), avoiding blur and compression artifacts.
- Lightweight architecture: 16 layers, 512 hidden width, 8 attention heads, and partial 2D-RoPE (positional encoding for 2D grids), totaling roughly 66.4M parameters.
- Style and palette slots: each 2×2 patch is encoded using three palette slots and one style slot.
- Permissive license: model weights are released under Apache-2.0, with training and inference source code available on GitHub.
What you can do
- 2D game prototyping: quickly batch-generate inventory icons—potions, swords, helmets, coins, or level props.
- Character and enemy drafting: create base sprites for creatures (such as slimes or monsters) ready for manual cleanup by an artist.
- Research and fine-tuning: use the pipeline code from the QuarkOS/pixie repository to experiment with autoregressive indexed-graphics generation.
Example
hf download EmilioSchwaiger/pixie-32 --local-dir pixie-32
hf download openai/clip-vit-large-patch14 model.safetensors tokenizer.json --local-dir clip-vit-large-patch14
python -m train.sample_pixie --model-dir pixie-32 \
--clip clip-vit-large-patch14/model.safetensors \
--tokenizer clip-vit-large-patch14/tokenizer.json \
--prompt "red potion" --prompt "iron helmet" --n 4 --out sprites.png
Read more
DetailsMetrics: IID validation NLL reached 0.5237 at step 17,746 (roughly 1.25M images seen).
Training: trained on a dataset of ~130k 32×32 sprites generated via Krea 2 Turbo with a pixel art LoRA.
Requirements: requires a separate download of the CLIP ViT-L/14 text encoder (not bundled with the weights).
Limitations: experimental research model with inconsistent output quality; magenta fringe pixels from the training chroma key occasionally appear along sprite edges.










Comments