Tessera-small: a diffusion language model for 16Γ—16 pixel art

Author: Jagrat Patel (TheJagStudio) Live demo: Tessera Pixel Studio License: CC BY-NC 4.0. Free for education, research and personal non-commercial use with credit. Commercial use is not allowed without a separate license from the author.

showcase

Tessera treats a 16Γ—16 sprite as a 256-token sentence. Every pixel is one token from a learned 512-color palette (token 0 = transparent). A bidirectional transformer starts from a fully masked canvas and unmasks all 256 pixels in parallel in about 16 steps, conditioned on a frozen CLIP text encoder. It has no VAE, no latent space and no autoregression.

Model

Parameters 47.6M (Tessera-small)
Architecture joint text+pixel bidirectional transformer, hourglass 2 + 8 + 2 blocks (2Γ—2 patch-merged core), width 512, 8 heads, QK-RMSNorm, 2D axial RoPE, Conv-SwiGLU, adaLN-single, 4 registers, self-conditioning
Text encoder frozen openai/clip-vit-base-patch32 text tower, 24 tokens (not included, MIT licensed)
Vocabulary 512 palette tokens (frequency-weighted OKLab k-means, Ξ”E 0.010) + [MASK]
Objective absorbing-state masked diffusion, cosine schedule, blob masks, perceptual label smoothing, CFG dropout
Sampler parallel confidence-ordered unmasking with CFG, Gumbel-annealed choice, spatial NMS; inpainting supported

Training

82,342 steps Γ— 512 sprites (30 epochs over 1.4M sprites) on one NVIDIA RTX PRO 6000 Blackwell (β‰ˆ5.5 h). The optimizer is Muon for hidden matrices plus AdamW, with a Warmup-Stable-Decay schedule, EMA 0.9995, bf16 and torch.compile.

Metric (EMA weights) Value
Validation NLL 0.859 nats / pixel (perplexity 2.36 of 512)
Validation accuracy 78.8% of masked pixels
CLIP score (ViT-B/32) 25.24 generated vs 25.28 real sprites

Usage (non-commercial)

from huggingface_hub import hf_hub_download
from tessera.pipeline import TesseraPipeline   # code: see the demo Space's files

ckpt = hf_hub_download("thejagstudio/tessera-small", "tessera-small-fp16.pt")
pipe = TesseraPipeline.from_checkpoint(ckpt, device="cuda")
images = pipe(["golden crown with blue gems"], num_per_prompt=8, steps=16, cfg_scale=3.0, seed=0)
pipe.grid(images).save("crowns.png")

Files

File Contents
tessera-small-fp16.pt EMA weights (fp16), model config, palette, text-encoder id, training step
model_config.json, train_config.json architecture and training hyperparameters
metrics.jsonl full training and validation log
showcase.png sample grid (16 prompts Γ— 8 samples)

Credits

Huge thanks to Angais for creating and openly releasing Pixel Art Atlas 1.4M. This model was trained on it and would not exist without it.

License

Tessera is released under Creative Commons Attribution-NonCommercial 4.0.

  • βœ… Allowed (free): education, teaching, academic and independent research, personal projects and experiments. You can download, run, fine-tune and share the model, with credit ("Tessera by Jagrat Patel (TheJagStudio)").
  • ❌ Not allowed: any commercial use of the model or of images generated with it, such as selling or licensing it, paid apps, games or products, or monetized hosted services.
  • πŸ’Ό Commercial license: contact Jagrat Patel via Hugging Face.

Third-party parts keep their own licenses: the CLIP text encoder (OpenAI, MIT) and the Pixel Art Atlas 1.4M dataset (Angais).

Β© 2026 Jagrat Patel (TheJagStudio).

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Dataset used to train thejagstudio/tessera-small

Space using thejagstudio/tessera-small 1