Downloads · 30 days
1.9K
45% of all-time downloads
adirik/pixel-art-lora-flux.2-klein-4B
pixel-art-lora-flux.2-klein-4B is a text-to-image model from adirik. Use it when you need an image from a text prompt. It is set up for diffusers. The card lists the license as apache-2.0.
A LoRA adapter trained for 512x512 resolution pixel art generation with FLUX.2-klein-4B-base model. <Gallery /
Downloads · 30 days
1.9K
45% of all-time downloads
All-time downloads
4.2K
Public
Repo size
1.8 GB
Likes
1
Public
Click a slice to open those files.
.safetensors370 MB · 100%
From the Hugging Face model README
A LoRA adapter trained for 512x512 resolution pixel art generation with FLUX.2-klein-4B-base model. <Gallery />
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 |
You should use PXART4 to trigger the image generation.
Weights for this model are available in Safetensors format.
Download them in the Files & versions tab.
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