Pixy: browser-based 16x16 pixel art generator tailored to your palette
2 min readupdated
At around 40M parameters, this model generates compact 16x16 pixel sprites based on a text prompt, guide image, or both. Its standout feature is that output colors strictly adhere to a custom palette you provide (up to 32 colors, whether a Game Boy palette or your game's custom palette). Thanks to ONNX export, the model runs directly in the browser via WebGPU in about half a second.
Key features
- Palette support up to 32 colors (including popular palettes like PICO-8 or extracting colors from an image).
- Convert photos, icons, or drawings into clean pixel art.
- Full browser-based execution support via onnxruntime-web (both WebGPU and standard fallback modes).
- MaskGIT-style diffusion generation filling the grid in 12 steps.
What you can do
- Generate characters and objects for indie games in a unified style with a fixed palette.
- Transform existing sketches and icons into retro pixel art sprites.
- Embed sprite generation directly into a web interface or browser game.
Example
Running model inference via ONNX runtime to generate a sprite from a text description and a palette:
import onnxruntime as ort
# Загрузка ONNX моделей для генерации спрайтов
sprite_session = ort.InferenceSession("sprite_fp16.onnx")
text_session = ort.InferenceSession("text_fp16.onnx")
Read more
DetailsMetrics: pixel exact match accuracy on the Image → sprite task is 95.7%.
Requirements: a WebGPU-enabled browser downloads roughly 210 MB (fp16 model weights + tokenizer).
Limitations: sprite size is strictly 16x16 pixels, suitable only for single objects.


![FLUX.2 [dev]](/media/siyarajput--flux-2-dev-backup/cover-320.webp)
![FLUX.2 [dev]](/media/siyarajput--flux-2-dev-backup/cover.webp)




Comments