Instructions to use lizozom/pixel-icon-lora-sdxl with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use lizozom/pixel-icon-lora-sdxl with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("lizozom/pixel-icon-lora-sdxl") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
Pixel Icon LoRA (SDXL)
Draws at a native 16Γ16 logical grid on a 512px canvas β one logical pixel is exactly 32 screen pixels. Extracting a finished icon is then sampling each block's centre, rather than downscaling and hoping.
Most "pixel art" models produce pixel-ish art: blocky-looking images with thousands of colours and no real lattice, which turn to mush when reduced to an actual small grid. This one draws a true lattice, so reduction is near-lossless.
Use
pipe.load_lora_weights("lizozom/pixel-icon-lora-sdxl")
prompt = ("yotoicon, 16x16 pixel art icon of a cat, low resolution game "
"sprite, flat colours, hard edges, centred, black background")
Trigger word: yotoicon. 512Γ512, ~30 steps, guidance 7.
Try a LoRA scale of 0.6β0.8 rather than 1.0 β at full strength it sometimes over-commits and fragments the subject.
Method
Trained on 522 hand-made 16Γ16 pixel icons, nearest-neighbour upscaled to 512Γ512. At 16Γ16 every pixel is already one discrete colour, so pixel duplication produces a mathematically perfect lattice (measured interior spread: 0.0) that still carries the source palette and style.
Alpha thresholded at 128 onto solid black. Black is a far cleaner key colour than white for this material β near-black appears in only 6% of the source set and never above 15% of a single icon, whereas white collides with the cream highlights that are common in the art.
rank=16, lr=1e-4, 500 steps (~7.5 epochs), batch 4 Γ 2 accumulation,
resolution 512, horizontal flip only.
No crop, no resize, no aspect bucketing. Any shift by a non-multiple of 32 misaligns the pixel grid and destroys the entire training signal β this is the one setting that matters.
Results
Flatness at logical grid 16 (lower is flatter) improved roughly 6Γ over the base model plus an off-the-shelf pixel-art LoRA:
| spread @ grid 16 | grid drawn at | |
|---|---|---|
| base + off-the-shelf pixel LoRA | 23β99 | 64β256 |
| this | 6β15 | 16β32 |
Training data is not published: it is derived from a third party's artwork.
- Downloads last month
- 47
Model tree for lizozom/pixel-icon-lora-sdxl
Base model
stabilityai/stable-diffusion-xl-base-1.0