File size: 4,451 Bytes
5b05f2b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ef3489b
 
5b05f2b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
---
license: apache-2.0
library_name: pytorch
pipeline_tag: text-to-image
tags:
- pixel-art
- sprite-generation
- text-to-image
---

# Pixie P32 (pixie-32)

A 66M-parameter autoregressive model that paints native 32×32 palette-indexed pixel-art sprites from a short text prompt.
Code, training pipeline and sampler: [github.com/QuarkOS/pixie](https://github.com/QuarkOS/pixie).
Sibling model: [EmilioSchwaiger/pixie-16](https://huggingface.co/EmilioSchwaiger/pixie-16).

Files: `model.safetensors` (weights), `config.json` (architecture), `palette.npy` (4097×3 uint8 palette; index 0 is transparent).

![Samples: red potion, iron helmet, green slime (4 each, seed 0, CFG 2.0)](sample.png)

## Model

| Field | Value |
| --- | --- |
| Name | Pixie P32 (`pixie-32`) |
| Version | Best checkpoint of the first full P32 run: step 17,746, about 1.25M training images seen |
| Architecture | P32: autoregressive transformer over palette indices. Width 512, 16 layers, 8 heads, 2×2 patch tokens (256 patches of four palette slots), partial axial 2D-RoPE, three palette slots and one style slot. See the README. |
| Parameters | 66,424,320 (counted from the released `model.safetensors`; 224 float32 tensors) |
| Checkpoint SHA256 | `1a26888728f3c523075f691e4fddb270889e0a4db814c516da016709a06b9dbc` (`model.safetensors`) |
| Output | One 32×32 RGBA sprite per sample; index 0 is transparent |
| Text encoder | External, not shipped: the first 11 layers of the [openai/clip-vit-large-patch14](https://huggingface.co/openai/clip-vit-large-patch14) text model (penultimate features, 18 positions) |
| Intended use | Generate palette-indexed pixel-art game sprites (items, weapons, characters, creatures, props) from a short English prompt. |
| Out of scope | Photoreal images, text rendering, anything larger than 32×32, and subjects far outside game-sprite content. |

## Training data

| Field | Value |
| --- | --- |
| Training set | About 130k native 32×32 sprites generated for this project with Krea 2 Turbo plus a pixel-art LoRA, cut from 3×3 sheets by `data-pipeline/extract_v2.py`. Not released. |
| License of the data | The generated sprites are Krea 2 Outputs, owned by their generator per section 5.3 of the [Krea 2 Community License](https://github.com/krea-ai/krea-2/blob/main/docs/KREA-2-COMMUNITY-LICENSE). See [NOTICE](NOTICE). |
| Holdouts excluded | The Blind-50 and Eval-50 phrase lists were excluded from training by the builder's frozen-holdout check. The lists themselves are not published. |
| Personal data | None in the weights files. Captions are the generation prompts. |

## Weights license

| Field | Value |
| --- | --- |
| License | Apache-2.0, the same as the code. See [LICENSE](LICENSE) and [NOTICE](NOTICE). |
| Inherited restrictions | None claimed. No Krea or CLIP weights are part of the release; CLIP (MIT) is downloaded separately at sampling time. |

## Evaluation

| Field | Value |
| --- | --- |
| IID validation NLL | 0.5237 at the released step (lowest of the run, which is why this checkpoint was kept) |
| Blind-50 / Eval-50 | Not reported as a number for this release. |

## Known limitations

- Stray magenta pixels: the training sheets used a magenta key background, and
  some samples keep a few magenta background-key pixels near the edges.
- The run overfits after about 1.25M images; later checkpoints were worse on
  IID NLL, so this is not the last checkpoint of the run.
- Needs the external CLIP ViT-L/14 text encoder, which is linked, not shipped.
- Quality varies by subject; many samples are rough. Treat it as a small
  research model, not a finished asset generator.

## How to sample

```bash
git clone https://github.com/QuarkOS/pixie && cd pixie
python3 -m venv .venv && . .venv/bin/activate
pip install torch numpy pillow tokenizers safetensors huggingface_hub
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
```

Each row of `sprites.png` is one prompt (32×32 sprites, upscaled with nearest-neighbour).

## License

Apache-2.0 for the weights. See [LICENSE](LICENSE) and [NOTICE](NOTICE) (Krea 2 attribution and third-party credits).