pixelsprite canvas v3: text to 16×16 / 24×24 / 32×32 pixel sprites

An autoregressive transformer (101.2M parameters) that draws pixel-art sprites from a caption, pixel by pixel. It is the successor of pixelsprite-canvas-v2: the same method, 2.6 times larger, and the outline of the sprite is now a word of the caption.

32x32 samples

  • Sizes: 16×16 and 32×32 (trained), plus 24×24 drawn as a window in the middle of the 32×32 canvas (not trained separately).
  • Pixel by pixel: the model writes the sprite left to right and top to bottom. For every pixel it picks one of 1,024 palette colours or "transparent". This is the next-token method of text models, applied to pixels.
  • Outline on request: add "with outline" or "no outline" to the caption.
  • Multilingual captions: they go through the frozen paraphrase-multilingual-MiniLM-L12-v2 encoder.
  • Separate guidance: classifier-free guidance is applied separately to the shape (transparent or not) and to the colour. By default shape is 1 and colour is 2.
  • Optional silhouette: give a silhouette and only the colours are chosen. The outline is kept exactly.

Animate the sprites with pixelsprite-animgpt-v3.

What is new in v3

canvas v2 canvas v3
Parameters 39.1M (12 layers, width 512) 101.2M (14 layers, width 768)
Training sprites 1.43M originals 1.58M originals + 0.52M copies with the outer outline repainted
Outline whatever the data had (almost always outlined) a word of the caption: "with outline" / "no outline"
File layout, palette size, sampling unchanged: code written for v2 loads v3

outline

The same captions and seeds with the two outline words.

Quick start

pip install "git+https://github.com/umanets/pixelsprite"
pixelsprite "frost sword with outline" --size 16 --n 16 --model ihor-umanets/pixelsprite-canvas-v3
from pixelsprite import SpritePipeline

pipe = SpritePipeline.from_pretrained("ihor-umanets/pixelsprite-canvas-v3")
res = pipe.generate("a teal cookie jar with outline", n=8, size=32, seed=0)   # g_shape=1.0, g_colour=2.0 by default
res.save("outputs/jars")                                                       # PNGs (alpha = silhouette) + sheet.png
plain = pipe.generate("a teal cookie jar no outline", n=8, size=32, seed=0)
recolour = pipe.generate("ice potion", n=4, size=32, mask=res.index[0] >= 0)   # colour a given silhouette

The package is the one written for v2; it reads the architecture from config.json, so the only change is the repo name. The sample sheets on this page were drawn with it on a GPU.

Files in this repo:

  • model.safetensors: weights only, float32.
  • config.json: architecture, text encoder, special tokens and sampling defaults.
  • palette.json: the 1,024 sRGB colours.
  • onnx/: the same weights for ONNX Runtime, in the layout of canvas-v2. decoder_static.onnx and decoder.onnx are float32 graphs of the transformer blocks and the head, one token per call with a key/value cache: a fixed-size cache for the whole sprite, written at pos, in the first; a growing one in the second. Both take their large weights as external data, shipped once as float16 in decoder.f16. embeddings.bin / embeddings.json hold the input tables.
16×16 24×24 (window)
16 24

languages silhouette

Model

Architecture Decoder-only transformer: 14 layers, width 768, 12 heads, MLP 3072, pre-norm, GELU, dropout 0.1
Sequence [text vector, canvas size, S silhouette-row tokens, S×S pixel tokens]. Pixel token = previous pixel + row + column + edge flag.
Output per pixel 1,024 colours + EMPTY (transparent)
Silhouette input Row bits of the silhouette, or "unknown" (given in half of the training examples)
Text Frozen multilingual MiniLM, 384-d L2-normalised vector. A learned null vector stands for "no text". 10% of training examples drop the text, which makes guidance possible.
Parameters 101,188,865

Training

  • Data: pixelsprite-dataset-v3, blocks A and B.
    • Block A: 1,579,270 original sprites at 16×16 and 32×32, from Angais/pixel-art-atlas-1.4m and azyg0s/pixelart-172k; almost all of them are outlined.
    • Block B: 522,206 copies of block A sprites with the outer outline repainted. A copy always shares the split of its original.
    • Mix: 75% originals, 25% copies. The caption says "with outline" or "no outline" according to the sprite, or says nothing.
    • The text is either the short subject or the full caption, half the time each.
  • Palette: 1,024 colours, k-means in OKLab.
  • Optimisation:
    • AdamW, learning rate 5.5e-4, weight decay 0.1.
    • Warm-up of 1,500 steps, then cosine decay.
    • bf16 autocast, batches of about 49k tokens, each batch a single canvas size.
  • Compute: 12 million sprites (about 6.3 passes over each block), 90,899 steps, 433 minutes on one NVIDIA RTX 5090.
    • Evaluated every 500,000 sprites; 23 of 24 evaluations improved by more than the noise of the measurement. The released weights are the last one.

Evaluation (validation split, 3,000 sprites per block and size)

16×16 32×32
Bits per sprite, originals 319 876
Bits per sprite, copies without outline 370 891
Colour bits per pixel when the silhouette is given, originals 1.84 2.22
Colour bits per pixel when the silhouette is given, copies 2.16 2.22
  • Against v2: v2 scored 323 / 883 bits on its own held-out originals. The sets are not identical, so read this as "about the same per-sprite likelihood on originals, plus the sprites without outline that v2 never saw", not as a measured gain.
  • Outline words: an automatic outline detector finds an outline in 100% of the sprites drawn with "with outline" and in 12.5% of those drawn with "no outline". By eye the latter are false alarms on dark objects. Without either word the model draws an outline in 52-71% of the sprites.
  • Not measured for v3: the shape statistics, the real-vs-generated classifier, the named-colour test and the human check reported on the v2 card were not repeated.

Limitations

  • Composition: as in v2, single colour or material words work, two attributes together often do not. The model hears words, not their combination.
  • Pose and size words ("upright", "pointing down", "tiny") have weak or no effect.
  • Languages: Russian and Ukrainian work when the phrase has a clear English counterpart in the data and can drift otherwise. In the sheet above "fire sword" gives flames in English and mostly plain swords in Russian and Ukrainian.
  • Sprites without outline are harder: fine detail at 16×16 is noisier with "no outline".
  • Reproducibility: results depend on the device and on how many sprites are drawn in parallel. The same seed reproduces only under the same conditions.
  • Style: the style is that of the training data. Both source datasets are AI-generated, and the sprites inherit those generators' style and biases.

Licence and data

  • Weights: CC BY-NC 4.0 (non-commercial use; attribution). See LICENSE.md.
  • Code (GitHub): Apache-2.0.
  • Pixel Art Atlas: released by its author under CC0 1.0. It was generated with Krea 2 Turbo and a pixel-art LoRA. The card states that this does not grant rights in Krea's models or third-party material, and does not override the Krea 2 Community License. Check the dataset card and Krea's terms before any commercial use of outputs.
  • pixelart-172k: MIT. All images are AI-generated.
  • Text encoder: paraphrase-multilingual-MiniLM-L12-v2, Apache-2.0.

Links

Citation

@misc{umanets2026canvasv3,
  author       = {Umanets, Ihor},
  title        = {pixelsprite canvas v3: drawing pixel-art sprites from a caption, pixel by pixel},
  year         = {2026},
  howpublished = {\url{https://huggingface.co/ihor-umanets/pixelsprite-canvas-v3}},
  note         = {Non-commercial (CC BY-NC 4.0).}
}
Downloads last month
50
Safetensors
Model size
0.1B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Datasets used to train ihor-umanets/pixelsprite-canvas-v3