Skip to main content

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.

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 inspect my_images/            # no-ground-truth quality table
ai2pixelart viewer my_images/             # interactive web workspace, port 8412

--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 codePolyForm Noncommercial License 1.0.0 + output carve-out.

  • Trained model weightsCC 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ai2pixelart-0.1.0.tar.gz (94.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ai2pixelart-0.1.0-py3-none-any.whl (86.6 kB view details)

Uploaded Python 3

File details

Details for the file ai2pixelart-0.1.0.tar.gz.

File metadata

  • Download URL: ai2pixelart-0.1.0.tar.gz
  • Upload date:
  • Size: 94.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for ai2pixelart-0.1.0.tar.gz
Algorithm Hash digest
SHA256 72f491374c34d9265594066b39c471919ad580a196333a058467e26fb484d7cf
MD5 0e42d57e0deca703e3dd1f2e8ef5676f
BLAKE2b-256 1ba79e1ae8f69a5d5d0d8df6986bca8a7d4f24854ab1c8b55092161c7bf7a88b

See more details on using hashes here.

File details

Details for the file ai2pixelart-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ai2pixelart-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 86.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for ai2pixelart-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 59b68d71feff962f837a1981156b67240575064da9d5e3090cab9e1f628cd0b4
MD5 3ecf58e5978255905d59e0df558afc91
BLAKE2b-256 c9fdf762327d3e7065bc0eca6794aa0984ee382938d9dd0e68dd534a7ab5c790

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page