Pixel Art Sprite LoRA (FLUX.2-klein-4B)
A LoRA fine-tune of FLUX.2-klein-4B for generating pixel art game sprites.
Usage
from diffusers import Flux2KleinPipeline
import torch
pipe = Flux2KleinPipeline.from_pretrained(
"black-forest-labs/FLUX.2-klein-4B",
torch_dtype=torch.bfloat16,
)
pipe.load_lora_weights("Limbicnation/pixel-art-lora")
pipe.to("cuda")
image = pipe(
"pixel art sprite, a brave knight with sword and shield, game asset",
num_inference_steps=4,
guidance_scale=1.0,
).images[0]
image.save("knight_sprite.png")
Trigger word: pixel art sprite
Training Details
| Parameter | Value |
|---|---|
| Base model | black-forest-labs/FLUX.2-klein-4B |
| LoRA rank | 64 |
| LoRA alpha | 128 |
| rsLoRA | enabled |
| Dataset | 1010 images, 512px |
| Training steps | 1000 |
| Batch size | 1 (grad_accum 4) |
| Learning rate | 1e-4 (cosine w/ restarts) |
| Optimizer | AdamW 8-bit |
| Precision | bfloat16 |
| Loss range | 1.62-1.93 (stable) |
| Hardware | NVIDIA RTX 4090 |
Inference Parameters
- Steps: 4 (FLUX.2-klein is optimized for few-step inference)
- Guidance scale: 1.0
- Resolution: 512x512 recommended (trained resolution)
License
Apache 2.0 (same as base model)
- Downloads last month
- 12
Model tree for Limbicnation/pixel-art-lora
Base model
black-forest-labs/FLUX.2-klein-4B