UbaNova-32
pixel art sprite generator
2 min readupdated
UbaNova-32 is a compact 42.8M-parameter autoregressive model created by Muhammad Fahril Irkham to generate 32x32 2D pixel art from English text prompts. It predicts pixels sequentially in raster order, guided by a frozen CLIP (computer vision and text processing model) text encoder alongside control tokens for size, background, canvas fill ratio, and detail density. The model outputs crisp sprites with exact palette colors and transparent backgrounds—no blurring or post-processing required—making it a handy tool for indie game devs and content creators.
Key features
- Sprite generation: creates detailed 32x32 pixel art with a transparent background from text prompts.
- Fine-grained control: lets you adjust output size (including a 16x16 mode), background, canvas fill ratio, and color density.
- Autoregressive architecture: a 42.8M-parameter decoder-only transformer that predicts pixels one by one in raster order.
- Lightweight and efficient: runs on a GPU with FP16 autocast or on a standard CPU, with weights taking up just 86 MB.
What you can do
- Build game assets: generate sprite sets for 2D games, including weapons, potions, characters, and environment props.
- Design UI elements: produce clean pixel icons for retro projects and indie titles.
- Experiment with styles: tweak prompts and detail settings to get classic 16x16 or 32x32 retro graphics.
Example
from infer32 import SpriteGenerator32
gen = SpriteGenerator32() # cuda если доступно, иначе cpu
images = gen.generate("golden crown with rubies", n=4, seed=42) # список 32x32 RGBA PIL изображений
images[0].resize((256, 256), 0).save("crown.png")
Read more
DetailsArchitecture: decoder-only transformer (512 hidden width, 12 layers, 8 attention heads)
Parameters: 42.84M trainable parameters
Benchmarks: CLIP score 28.87, prompt retrieval accuracy R@1 50.0%
Weights: FP16, 86 MB, initialized from UbaNova-16




![Nix Comic [Multiple Styles]](/media/civitai--2836231-nix-comic-multiple-styles/cover-320.webp)
![Nix Comic [Multiple Styles]](/media/civitai--2836231-nix-comic-multiple-styles/cover.webp)




Comments