Turn AI-generated pseudo pixel art into pixel-perfect, palette-clean pixel art
Project description
ai2pixelart
Turn AI-generated pseudo pixel art (wobbly grids, mixed-color cells, way too many shades) into pixel-perfect, palette-clean pixel art — without losing the single-pixel details that carry the design.
Left: AI-generated pseudo-pixel-art. Middle: a naive "downscale + median" baseline — muddy and off-grid. Right: ai2pixelart's Neural Robust output. Each cell zooms the boxed detail so the difference is visible.
Setup
pip install ai2pixelart # classical cleaner only (no GPU, no torch)
pip install "ai2pixelart[neural]" # + run the trained networks
pip install "ai2pixelart[gen]" # + full data-engine / training stack
Or with conda for development:
conda env create -f environment.yml # creates env "ai2pixelart"
conda activate ai2pixelart
pip install -e ".[dev]"
The classical "Simple" approach needs no GPU; the neural approaches need
the neural extra and download their weights from the Hugging Face Hub
(arnekummerow/ai2pixelart)
automatically on first use (cached thereafter — ai2pixelart models download pre-fetches them for offline use).
Usage
ai2pixelart clean input.png -o out.png --preview-scale 8 # classical
ai2pixelart clean input.png -o out.png --approach robust # neural
ai2pixelart clean input.png -o out.png --palette "#1e2234,#5ea740,#f0f0f0"
ai2pixelart clean my_images/ -o out_dir/ --approach robust # batch a folder
ai2pixelart inspect my_images/ # no-ground-truth quality table
ai2pixelart viewer my_images/ # interactive web workspace, port 8412
Neural inference uses the GPU automatically when one is available and falls
back to CPU otherwise; force it either way with --device cpu / --device cuda (the tiny net is CPU-bound in practice, so the GPU mainly helps on
large images or batches).
--approach is simple (classical, the default) or a neural model — a name
under runs/ (robust, detail) or a path to a .safetensors/.ckpt
file. Run
ai2pixelart --help to see the full command tree (clean, viewer,
inspect, eval, demo, plus data … and train … for the pipeline).
How it works
The classical pipeline ("Simple") detects the fake-pixel grid, extracts a palette, and votes each cell's color — deterministic, no GPU. The neural presets run the same grid/palette proposal, then a small U-Net assigns each cell a palette entry; it is structurally incapable of off-palette colors and carries learned priors (recovering pure 1-px details, collapsing shaded backgrounds) that no local method can. It was trained on pairs corrupted by the diffusion stack itself, so inverting AI rendering artifacts is exactly what it learned.
Two checkpoints are maintained: Neural Robust (recommended default) and Neural Detail (best 1-px retention on very fine grids, the fallback when Robust over-corrects).
Limitations
- Fake-pixel pitch below ~2 px is undetectable by construction — set the pitch manually or use the granularity control.
- One global grid per image: locally varying pitch is out of scope.
- Colors missing from a forced palette cannot be assigned well by any method.
Documentation
- docs/APPROACH.md — the method: classical pipeline, neural design, training-data philosophy, when to use which preset.
- docs/VIEWER.md — the interactive workspace viewer.
- docs/IMPLEMENTATION.md — module layout, data engine, retraining recipes, server API.
- docs/DEVLOG.md — the full iteration history: what was tried, measured, rejected, and what's left as future work.
License
The pixel art you make with ai2pixelart is yours — sell it, ship it in a commercial game, whatever you like. The noncommercial terms restrict the tool, not its output. Concretely:
-
✅ Use it (even at a company) to produce pixel art, and use that art commercially.
-
✅ Modify and share the code and models for any noncommercial purpose, keeping the credit notice.
-
❌ Commercialize the tool itself — selling it, or offering its functionality as a paid/subscription/ad-supported product, service, platform, or API — needs a separate license.
-
Source code — PolyForm Noncommercial License 1.0.0 + output carve-out.
-
Trained model weights — CC BY-NC 4.0 + output carve-out.
Credit: ai2pixelart © 2026 Arne Kummerow. These are source-available, not OSI "open source." To build something commercial on the tool, get in touch about a commercial license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ai2pixelart-0.1.1.tar.gz.
File metadata
- Download URL: ai2pixelart-0.1.1.tar.gz
- Upload date:
- Size: 99.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
531c3c266edeebad5c0c3dd381081cf63bce9b18eaa5fbe25c1e017fb145b0d5
|
|
| MD5 |
ab429f88349b2f195584899183a902ce
|
|
| BLAKE2b-256 |
1cf04ee001f54e67547583e66485bb5d37fec6c63184a957807489fdd01fe45a
|
File details
Details for the file ai2pixelart-0.1.1-py3-none-any.whl.
File metadata
- Download URL: ai2pixelart-0.1.1-py3-none-any.whl
- Upload date:
- Size: 90.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff12a32e0e2e2ab1e94571dece5b5bfc7156fc41ac4f63bd28bc40a04eaf83b0
|
|
| MD5 |
4bb549c67902ed93b784ff8519274ae7
|
|
| BLAKE2b-256 |
51168657853a1ce8e5f343de9201280d458a0ce8d94e38374a86e798fd12b8b0
|