/ Модель

Характеристики

Лицензия
MIT
Библиотека
onnx
Опубликована
21 ноя 2026

pixy

Генерация изображенийТекст → изображение3 профессии

pixy генерирует пиксельные спрайты отдельных объектов размером 16×16 по тексту и/или изображению с использованием заданной палитры до 32 цветов.

100скачиваний за 30 дней7лайковвеса обновлены22 ноя 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

pixy — компактная модель генерации пиксельной графики, разработанная автором репозитория harryfrz. Она создаёт спрайты размером 16×16 пикселей по текстовому описанию, изображению или их сочетанию. Модель содержит около 40 млн параметров и использует замороженный текстовый энкодер CLIP; для генерации применяется дискретная диффузия с маскированием в стиле MaskGIT.

На вход можно передать палитру до 32 цветов, включая собственную палитру игры. Выход ограничен её цветами и прозрачным фоном. Модель подходит для создания игровых предметов и существ, преобразования изображения одного объекта в спрайт, перекраски и получения вариаций. Доступны веса PyTorch и экспорты ONNX, в том числе для запуска в браузере. В README приведены результаты оценки на отложенных объектах; экспорт fp16 показал близкую точность к fp32.

Модель не предназначена для сцен, тайлсетов, персонажей крупнее 16×16, анимации или текста на изображении. На палитрах, сильно отличающихся от обучающих, цвета могут выбираться неожиданно; при расплывчатом запросе и неточно учитываемом изображении объект может измениться. Лицензия — MIT.

Сценарии применения

  • создание 16×16 спрайтов игровых предметов по текстовому описанию
  • преобразование изображения отдельного объекта в пиксельный спрайт
  • перекраска спрайта в заданную палитру
  • создание вариаций существующего спрайта
  • генерация иконок предметов для пиксельной игры

Ограничения

Модель создаёт только одиночные объекты размером 16×16 пикселей и не подходит для сцен, тайлсетов, крупных персонажей, анимации или текста. На необычных для обучения палитрах возможен неожиданный выбор цветов, а при расплывчатом запросе результат может отклониться от объекта на исходном изображении.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

pixy

pixy: 16×16 sprites in your palette. Treasure, weapons, magic, creatures, food, nature and props, all drawn by the model.

16×16 pixel-art sprites in your palette. pixy is a small model (about 40M parameters, plus a frozen CLIP text encoder) that draws a sprite from a text prompt, an image, or both. It can only use the colours you give it.

  • Bring any palette of up to 32 colours: PICO-8, Game Boy, your game's own colours, or colours taken from an image. The palette is an input, and the output head can only point at palette entries. Colours outside the palette can't be produced, and palettes never seen in training still work.
  • Image → sprite: a photo, icon or drawing of a single object becomes a clean 16×16 sprite in your palette.
  • Try it: https://pixy-chi.vercel.app
  • Runs in the browser. The ONNX exports run in onnxruntime-web. On a laptop GPU (WebGPU) one sprite takes about half a second.
  • PyTorch weights too (pytorch/), with the model definition and a short sampling script.

What it can draw

One object per sprite, on a transparent background, in whatever palette you give it. Things it draws well (all made by this model):

  • Treasure and items: crowns, gold coins, gems and diamonds, keys, treasure chests, scrolls
  • Weapons and armour: swords, axes, bows, shields
  • Potions and magic: health and mana potions, magic orbs, crystals, wizard hats, dragon eggs
  • Creatures: slimes, ghosts, skulls, cats, frogs, owls, fish
  • Food: apples, pumpkins, cheese, burgers
  • Nature: mushrooms, trees, cacti, fire flowers, hearts
  • Props: candles, lanterns, rockets, bombs

It also turns an image of a single object (a photo, an icon, a drawing) into a sprite, and can recolour an existing sprite or make variations of it. It doesn't do scenes, tilesets, characters larger than 16×16, animation or text.

Use the PyTorch weights

pip install torch transformers safetensors pillow huggingface_hub
hf download harryfrz/pixy --include "pytorch/*" "config.json" --local-dir pixy
cd pixy/pytorch
python sample.py --prompt "spooky mushroom" --palette endesga32 --n 8 --out mushrooms.png
python sample.py --prompt "golden key" --palette "#0f380f,#306230,#8bac0f,#9bbc0f"   # any hex list, 1 to 32 colours

sample.py downloads the CLIP text encoder (openai/clip-vit-base-patch32) on first use. With the same seed it produces the same sprites as the original training checkpoint (checked pixel for pixel). From Python: from sample import generate, parse_palette and generate("golden key", parse_palette("pico8"), n=4, seed=0) returns a [n, 16, 16] array of palette indices (0 is transparent, k is colour k).

How it works

  • Masked discrete diffusion (MaskGIT-style). Start from a fully masked 16×16 grid and fill in all pixels in parallel over about 12 steps, most confident first, with classifier-free guidance.
  • Input sequence: [CLIP text tokens | palette tokens | 256 pixel tokens].
    • Palette colours are embedded from their OKLab values, with no position information, so the palette is an unordered set.
    • A pixel holding colour k is embedded with the same vector as palette entry k.
  • Palette-pointer output head: each pixel scores every palette entry plus one "transparent" option. Shuffling the palette shuffles the outputs identically.
  • Optional guide image: a rough 16×16 picture added to the pixel tokens. It was trained on synthetic degradations of real sprites, so the model learns to turn a rough image back into clean pixel art.

Model inputs and outputs

text_*.onnx

  • Inputs: input_ids and attention_mask, both int64 [B, 32]. Tokenize with CLIP and pad to 32 with 49407.
  • Output: features float32 [B, 33, 512]. The pooled token comes first, then the 32 token states.

sprite_*.onnx (all masks are float32, with 1 meaning true)

InputShapeMeaning
text[B, 33, 512]features from the text encoder
text_mask[B, 33]1 for real tokens; the first entry is always 1
drop_text[B]1 for the unconditional branch of classifier-free guidance
pal_lab[B, 32, 3]the palette in OKLab, padded to 32
pal_valid[B, 32]1 for real palette entries
pixint32 [B, 256]-1 masked, 0 transparent, k for palette entry k (1-based)
guide[B, 256, 4]guide image, OKLab + alpha (zeros if there's no guide)
has_guide[B]1 if a guide image is given
  • Output: logits [B, 256, 33]. Index 0 is transparent and index k is palette entry k. Padded palette slots get a large negative logit.

Sampling uses 12 steps with guidance scale 3, unmasking the most confident pixels first on a cosine schedule. Every export was checked against the PyTorch model: given the same random numbers, the browser produces pixel-identical sprites in fp32.

Evaluation

Measured on 200 subjects held out of training entirely:

TaskScore
Image → sprite (synthetic degradations), pixels exactly right95.7%
Image → sprite, no prompt95.5%
Text → sprite, masked-pixel accuracy69.9%

The fp16 export loses no accuracy: 81.90% against 81.88% for fp32 on a held-out masked-pixel test.

Limitations

  • Only 16×16 sprites, of single objects. Busy scenes and full-frame photos don't work well.
  • In palettes very different from the training palettes, colours are sometimes chosen oddly. For example, a red apple can come out blue in Sweetie-16.
  • A vague prompt combined with a loosely followed image can drift into a different object.

Training data and licence

  • Licence: MIT, for the sprite model weights and the code. The bundled CLIP text encoder keeps its own MIT licence (Copyright (c) 2021 OpenAI); keep both notices when you redistribute the files.
  • Training data: Angais/pixel-art-atlas-1.4m, released under CC0 1.0 (public domain dedication), which lets you train on it and license the result as you like. The sprites in it were generated with Krea 2. The dataset card notes that CC0 doesn't override the Krea 2 Community License, which limits commercial use of Krea's model and its outputs to companies under US$1M annual revenue (§2.3) and doesn't restrict training other models on outputs. If you plan heavy commercial use, read those terms yourself; this is not legal advice.
  • Text encoder: the text tower of openai/clip-vit-base-patch32 (MIT), unchanged apart from the export.
  • Preset palettes: from Lospec, credited to their authors.
  • Inspiration: inspired by thejagstudio/tessera-small. No code, weights or configs from it were used.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · onnx

Нельзя запустить

Генеративная модель выложена не в формате diffusers: рантайм её не загрузит.

Ревизия весов
9985693

0 моделей