Sprite-gen: The Assembly Line for AI-Generated Sprite Sheets
A Python CLI and Codex skill that turns one base image into a runtime-ready sprite atlas by generating and cleaning frames row-by-row, because AI sprite sheets usually lie.

What it does
sprite-gen is a Python CLI and Codex/Claude skill that manufactures game-ready sprite atlases or transparent motion loops from a single still image. It drives generation row by row—one state per row—to lock character identity, strips chroma backgrounds to real alpha, extracts clean transparent frames, and bakes a runtime atlas with a machine-readable manifest.json.frame_layout. For video workflows, it can hand the same still to a motion model and return a seamless transparent loop per state, cut at the clip’s true period.
The interesting bit
The project treats AI-generated art as crude ore that needs refining. Instead of generating a whole sheet at once—which yields drifting poses, inconsistent faces, and backgrounds that won’t key out—it runs a component-row pipeline: generate, extract, curate, compose. A Backbone Lattice measures one grid for the entire subject and snaps every cut to it, while a built-in curation webview lets you reject, nudge, and preview loops live before baking the final asset.
Key highlights
- Identity-locked generation: Generates frames state-by-state from one base image to prevent the character from morphing between poses.
- Real alpha cleanup: Unmixes chroma backgrounds rather than simply peeling them, producing verified transparent frames.
- Runtime manifest: Emits
manifest.json.frame_layoutwith absolute frame rectangles, per-state fps, and loop flags so engines never guess a grid. - Breathe animation: Deterministic squash-and-stretch baked onto idle poses from a single sidecar field, anatomy-aware and pixel-true.
- Post-processing without regeneration: Supports deterministic recoloring, layer compositing, and exports to Aseprite, Phaser, and Flame formats.
Caveats
- Cyclic locomotion states like walk and run remain experimental unless they pass the built-in motion QA.
- The video-to-loop pipeline requires your own Grok API credentials; nothing is shipped with the repo.
Verdict
Indie devs and technical artists who want to turn AI-generated character art into clean, engine-ready 2D assets should look here. If you already have a hand-drawn pipeline you love, this is probably overkill.
Frequently asked
- What is aldegad/sprite-gen?
- A Python CLI and Codex skill that turns one base image into a runtime-ready sprite atlas by generating and cleaning frames row-by-row, because AI sprite sheets usually lie.
- Is sprite-gen open source?
- Yes — aldegad/sprite-gen is open source, released under the Apache-2.0 license.
- What language is sprite-gen written in?
- aldegad/sprite-gen is primarily written in Python.
- How popular is sprite-gen?
- aldegad/sprite-gen has 1.1k stars on GitHub.
- Where can I find sprite-gen?
- aldegad/sprite-gen is on GitHub at https://github.com/aldegad/sprite-gen.