Pixel Art Sprite LoRA for FLUX.2-klein-4B

A LoRA adapter trained on FLUX.2-klein-4B for generating pixel art character sprites. Optimized for game-ready assets with transparent backgrounds.

Highlights

  • 4-step inference — FLUX.2-klein is distilled, so generation is fast
  • 512x512 RGBA output with transparent backgrounds
  • CC0 training data — 100% public ___domain, no copyright concerns
  • Game-ready — designed for Godot, Unity, and other engines

Quick Start

Trigger Words

Always include in your prompt:

pixel art sprite, [your character description], game asset, transparent background

Style modifiers: 16-bit pixel art, 32-bit pixel art, chibi

Inference Parameters

Parameter Value
Steps 4
CFG Scale 1.0
Resolution 512x512
Sampler Euler

Python (Diffusers)

Requires diffusers >= 0.37.0.dev0 (install from git main)

import torch
from diffusers import Flux2KleinPipeline

# Load base model + LoRA
pipe = Flux2KleinPipeline.from_pretrained(
    "black-forest-labs/FLUX.2-klein-4B",
    torch_dtype=torch.bfloat16,
    low_cpu_mem_usage=False,
)
pipe.load_lora_weights("Limbicnation/pixel-art-lora")
pipe.to("cuda")

image = pipe(
    "pixel art sprite, a brave knight in shining armor, game asset, transparent background",
    num_inference_steps=4,
    guidance_scale=1.0,
    height=512,
    width=512,
).images[0]

image.save("knight.png")

ComfyUI

  1. Download the LoRA weights:
    huggingface-cli download Limbicnation/pixel-art-lora \
        pytorch_lora_weights.safetensors \
        --local-dir ./models/loras/
    
  2. Load FLUX.2-klein-4B as the base checkpoint
  3. Add a Load LoRA node, point to pytorch_lora_weights.safetensors
  4. Set LoRA strength: 0.85 - 1.4 (tested range)
  5. Use trigger words in your positive prompt

A sample workflow is included: comfyui_workflow.json

Sample Gallery

Preview Prompt
Knight pixel art sprite, a brave knight in shining armor holding a sword
Archer pixel art sprite, an elven archer with bow and quiver
Orc pixel art sprite, a fierce orc warrior with battle axe
Dragon pixel art sprite, a fire-breathing dragon with red scales
Slime pixel art sprite, a cute slime monster, blue and bouncy
Skeleton pixel art sprite, a skeletal warrior with rusty sword
Unicorn pixel art sprite, a majestic unicorn with rainbow mane
Vampire pixel art sprite, a dark vampire lord with cape and fangs
Marine pixel art sprite, a space marine in power armor
Cyberpunk pixel art sprite, a cyberpunk hacker with neon implants
Robot pixel art sprite, a cute robot companion with glowing eyes
Ninja pixel art sprite, a ninja assassin in black outfit with katana

14/15 samples generated successfully (1 failed due to content filter)

Training Details

Parameter Value
Base model black-forest-labs/FLUX.2-klein-4B
LoRA rank 64
LoRA alpha 128
rsLoRA Yes
Dtype bfloat16
Steps 1000
Batch size 1
Gradient accumulation 4
Learning rate 1e-4
LR scheduler Cosine with restarts
Optimizer AdamW 8-bit
Resolution 512x512
Dataset 500 images (CC0 curated + synthetic)

Final loss: ~1.8 - 2.0 (stable convergence)

Full training config: config.yaml

Dataset & Provenance

  • Training dataset: Limbicnation/pixel-art-character (1,010 images)
  • License: All training images are CC0 (public ___domain) — no copyright restrictions
  • Provenance: Full manifest with source attribution available in the dataset repo
  • Legal analysis: Synthetic training data compliant for commercial use

This model was trained with full data provenance tracking. All source images are CC0 public ___domain, making the outputs safe for commercial game development, Steam releases, and B2B studio use.

Architecture Notes

FLUX.2-klein-4B uses a different architecture from FLUX.1:

  • Text encoder: Qwen3 (not CLIP+T5)
  • Pipeline class: Flux2KleinPipeline (not FluxPipeline)
  • VAE: AutoencoderKLFlux2
  • Distilled: 4-step inference with guidance scale 1.0

You must use diffusers >= 0.37.0.dev0 (install from git main branch). The released 0.36.x does not include Flux2KleinPipeline.

License

This LoRA adapter is released under Apache 2.0.

The base model (FLUX.2-klein-4B) is also Apache 2.0 licensed.

Citation

@misc{pixel-art-lora-2026,
  title={Pixel Art Sprite LoRA for FLUX.2-klein-4B},
  author={Limbicnation},
  year={2026},
  url={https://huggingface.co/Limbicnation/pixel-art-lora}
}

Links

Downloads last month
3,788
Inference Examples
Examples
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Limbicnation/pixel-art-lora

Adapter
(62)
this model

Dataset used to train Limbicnation/pixel-art-lora