Closed
Description
this script https://github.com/huggingface/diffusers/blob/main/scripts/convert_lora_safetensor_to_diffusers.py
integrates the lora into the Pipeline and then outputs said Pipeline.
Is there a method to turn the .safetensors
Lora to a .bin
file to be loaded in dynamically similar to the snippet below
from diffusers import StableDiffusionPipeline
import torch
model_path = "sayakpaul/sd-model-finetuned-lora-t4"
pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", torch_dtype=torch.float16)
pipe.unet.load_attn_procs(model_path)
pipe.to("cuda")
prompt = "A pokemon with blue eyes."
image = pipe(prompt, num_inference_steps=30, guidance_scale=7.5, cross_attention_kwargs={"scale": 0.5}).images[0]
image.save("pokemon.png")
As seen here https://huggingface.co/docs/diffusers/training/lora
My complaint is there is a lot of redundancy in the model if you want different loras to be used.
Metadata
Metadata
Assignees
Labels
No labels