Pixel Art LoRA for FLUX.2-klein-4B-base
A LoRA adapter trained for 512x512 resolution pixel art generation with FLUX.2-klein-4B-base model.
Training Details
Trained on a subset 463 images (original resolution 64x64) from the bghira/free-to-use-pixelart dataset. Samples are upsampled to 512x512 for achieving a pixelated style and easier downsampling of generated images.
| Parameter | Value |
|---|---|
| Base model | black-forest-labs/FLUX.2-klein-4B |
| LoRA rank | 128 |
| LoRA alpha | 64 |
| rsLoRA | Yes |
| Dtype | bfloat16 |
| Steps | 500 |
| Batch size | 1 |
| Gradient accumulation | 4 |
| Learning rate | 1e-4 |
| LR scheduler | Cosine with restarts |
| Optimizer | AdamW |
| Resolution | 512x512 |
Trigger words
You should use PXART4 to trigger the image generation.
Download model and use it with ComfyUI, AUTOMATIC1111, SD.Next, Invoke AI, etc.
Weights for this model are available in Safetensors format.
Download them in the Files & versions tab.
Use it with the 🧨 diffusers library
from diffusers import AutoPipelineForText2Image
import torch
pipeline = AutoPipelineForText2Image.from_pretrained('black-forest-labs/FLUX.2-klein-base-4B', torch_dtype=torch.float16).to('cuda')
pipeline.load_lora_weights('adirik/pixel-art-lora-flux.2-klein-4B', weight_name='pixelart_lora.safetensors')
image = pipeline('PXART4. A pixel art of a knight with a cape standing in front of a castle gate at sunset.').images[0]
image.save("my_image.png")
For more details, including weighting, merging and fusing LoRAs, check the documentation on loading LoRAs in diffusers