Diffusers How to use svntax-dev/pixel_spritesheet_4walk_small_lora_v1 with Diffusers:
pip install -U diffusers transformers accelerate
import torch
from diffusers import DiffusionPipeline
# switch to "mps" for apple devices
pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.2-klein-base-4B", dtype=torch.bfloat16, device_map="cuda")
pipe.load_lora_weights("svntax-dev/pixel_spritesheet_4walk_small_lora_v1")
prompt = "A pixel art spritesheet of a medieval knight wearing metal armor and a helmet with a red plume. The spritesheet is a 4 by 4 grid of four rows of frames - first row is 3 walking frames facing down and 1 frame both arms raised, second row is 3 walking frames facing left and 1 frame jumping left, third row is 3 walking frames facing right and 1 frame jumping right, fourth row is 3 walking frames back view facing up and 1 frame lying on floor."
image = pipe(prompt).images[0]