Cook up game-ready sprites with AI. ๐ฎ๐พ
Directional clips ยท sprite sheets ยท sprite pairs (diffuse + normal map) for real dynamic lighting.
CookSprite is AI-generation-first, not a hand-drawing pixel editor. ๐จ Generate, preview, pixel-perfect, and regenerate individual frames โ then round-trip to editors like Aseprite via standard PNG sprite sheets when you want to hand-tune. ๐๏ธ
๐ง Model + Inference โโ[ /infer HTTP API ]โโโบ atomic op ยท local OR docker
โ๏ธ Workflow โโ[ typed tool graph ]โโโบ one minimal task
๐ฅ๏ธ Frontend โโ[ triggers workflows ]โโโบ Web toolbox (you) + CLI/skill (agents)
Four ABI-decoupled layers. ๐ Swap a model, add a workflow, or replace the UI without touching the rest. ComfyUI is supported as an export target (workflow โ ComfyUI API JSON), not a dependency.
- ๐ฏ Task โ what you want (e.g. "a single sprite pair"). A DAG of workflow-nodes; each node runs one workflow from a list of candidates.
- ๐ฃ๏ธ Workflow โ a flat tool graph that takes typed inputs and returns one typed artifact. Reusable across tasks; you never wire nodes by hand.
- ๐ง Tool โ the smallest unit, with typed I/O.
kind="inference"calls a model;kind="deterministic"runs locally (pixelize, crop, packโฆ).
pip install -e .
# See what CookSprite can do
cspr list
# Cook a sprite (diffuse + normal pair) ๐ณ
cspr run single_sprite --prompt "a small copper robot" --out ./out
# Export any workflow to ComfyUI API JSON ๐
cspr export single_sprite --out workflow.jsonPrefer the web toolbox? ๐ฅ๏ธ cd web && npm install && npm run dev โ includes a three.js draggable-light preview so you can see your normal maps light up in real time. ๐ก
v1 vertical slice โ green. โ
Single-prompt โ single-sprite pipeline runs end-to-end GPU-free (deterministic stub adapter), with a production vLLM-Omni inference path wired for real model weights. See docs/ for the full design.
PRs welcome! New workflows are just declarative YAML; new Tools/Ops are small typed Python functions. Start with docs/03_WORKFLOW.md.
Apache-2.0. Cook freely. ๐งโ๐ณ