Docs / Workflows / Generating sprites

Workflows

Generating sprites

From prompt to a usable sprite, including the transparent-background shortcut.

Updated Aug 9, 2026

The basic loop

  1. comfy-up, tunnel, open ComfyUI.
  2. Load klein-4B fp8, its Qwen3-4B text encoder, and the FLUX.2 VAE.
  3. Add the pixel-art LoRA.
  4. Generate a batch. Do not generate one image and judge the model on it — generate eight and judge the distribution.
  5. Cull hard. Most of the value in this workflow is in throwing things away quickly.

Generate big, then reduce

The instinct is to generate at the target sprite size. That is wrong, and it is the most common mistake in this whole pipeline.

Diffusion models are trained at high resolutions and behave badly at 32×32 — you get mush, not crisp pixel art. Generate at a comfortable resolution, then reduce to the true pixel grid afterwards. The reduction step is where the pixel-art character actually comes from. See Pixel-perfect output .

The transparent-background shortcut

The installed pixel-art LoRA emits sprites on a transparent background directly. When it works, it removes a whole cut-out stage — no keying, no matting, no halo cleanup.

When it does not (a busy prompt, an unusual subject), fall back to explicit background removal rather than fighting the prompt.

Prompting notes for this LoRA family

  • Name the shot. “full body”, “side view”, “idle pose” do more work than adjectives.
  • Name the palette. Constraining colour early saves a quantisation fight later.
  • Keep it short. These are 4B models with a compact text encoder; long literary prompts dilute rather than refine.
  • Avoid text in the image. Legible words remain unreliable; add them in your editor.

Batching

The card is power-limited, so throughput comes from batching and walking away rather than from per-image speed. A batch of eight at moderate resolution is a reasonable unit of work — large enough to judge a prompt, small enough not to blow the memory budget.

If a batch runs out of memory partway through, reduce batch size before reducing resolution: batch scales memory linearly and predictably, resolution does not.

Where the human comes in

Everything after generation happens on your own machine, not the GPU box, which is headless:

  • Aseprite — palette work, cleanup, animation timing
  • Krita — larger paint-overs and touch-ups
  • A tilemap editor — assembling assets into levels

The GPU box generates candidates. It does not finish anything.

Source: content/workflows/sprites.md · maintained in the nuilab-aigaming repository.