FLOWDocs

Pixl

Local pixel-art generator — SDXL plus a pixel-art LoRA, snapped to true pixel art.

pixl is a local pixel-art generator. It renders with SDXL and a pixel-art LoRA, then snaps the result to true pixel art — a clean, uniform grid and a limited palette — and shows everything in an interactive terminal gallery. It runs on Apple Silicon (Metal), NVIDIA (CUDA), or CPU, and the pixelizer also works standalone on any image.

It is published as flow-pixl on crates.io.

Install

cargo install flow-pixl

Generation is included by default (Metal on macOS, CPU elsewhere). Build variants:

  • --features cuda — NVIDIA GPUs (needs the CUDA toolkit).
  • --no-default-features — pixelize-only, no GPU/ML, builds fast anywhere.
  • --no-default-features --features view — pixelize plus the interactive viewer, still no GPU.

Quick start

pixl                                  # open the gallery and configure everything in-app
pixl "a cozy tavern"                  # 4 images -> ~/.pixl/<timestamp>-<prompt>/
pixl 12 "stardew valley house"        # a count
pixl --model sdxl --cfg 5 "a sword"   # full SDXL with classifier-free guidance
pixl pixelize photo.png --scale 8     # snap an existing image to pixel art (no GPU)

In a graphics-capable terminal (Ghostty, Kitty, iTerm2) this opens the interactive gallery; otherwise it prints a headless batch and a clickable link to the output folder.

How it works

pixl renders with SDXL (via candle) plus the nerijs/pixel-art-xl LoRA merged into the UNet, then runs a GPU-free pixelize pass: it detects the pixel grid (per-axis edge-energy folding, with square cells), collapses each cell to its dominant color, and quantizes to a limited Lab-space palette. Model weights download once from Hugging Face and cache locally — pixl models ls shows where.

On this page