Tried to load lora weights and failed in doing so
Here is my code:
~~
import torch
from diffusers import FluxPipeline
pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16, max_memory={0:"21GB"},device_map='balanced')
pipe.load_lora_weights("alvdansen/pola-photo-flux",)
pipe.load_lora_weights('alvdansen/pola-photo-flux', weight_name='pola_photo_araminta_k.safetensors', adapter_name='lora')
pipe.set_adapters('lora')
pipe.fuse_lora(adapter_names=['lora'])
prompt = "realistic photo of man wearing fit-slim neckline-round_neck sweater, fit-oversize long_sleeve_shirt, waist-high fit-baggy length-cropped jeans, dress_shoes. Man is outside in city. Avoid artifacts around eyes and hands"
image = pipe(prompt,
num_inference_steps=28,
guidance_scale=3.5,
width=1024, height=1024
).images[0]
image.save(f"example2.png")
~~
What am i doing wrong?