You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But I got the following error:
Traceback (most recent call last):
File "/cluster/work/sachan/wangjun/Math2Visual_experiment/SimpleTuner/stable-diffusion_inference3.py", line 7, in
pipe.load_lora_weights("/cluster/work/sachan/wangjun/model/finetuned_stable-diffusion", weight_name="pytorch_lora_weights.safetensors")
File "/cluster/project/sachan/wangjun/anaconda3/envs/stable-diffusion/lib/python3.11/site-packages/diffusers/loaders/lora_pipeline.py", line 1289, in load_lora_weights
raise ValueError("Invalid LoRA checkpoint.")
ValueError: Invalid LoRA checkpoint.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am using this code to do inference:
from diffusers import StableDiffusion3Pipeline
import torch
pipe = StableDiffusion3Pipeline.from_pretrained("model/models--stabilityai--stable-diffusion-3.5-large/snapshots/ceddf0a7fdf2064ea28e2213e3b84e4afa170a0f", torch_dtype=torch.bfloat16, use_safetensors=True)
pipe.to("cuda")
pipe.load_lora_weights("model/finetuned_stable-diffusion", weight_name="pytorch_lora_weights.safetensors")
prompt = "Draw some apples"
image = pipe(prompt).images[0]
image.save("Inference_result/generated_image.png")
But I got the following error:
Traceback (most recent call last):
File "/cluster/work/sachan/wangjun/Math2Visual_experiment/SimpleTuner/stable-diffusion_inference3.py", line 7, in
pipe.load_lora_weights("/cluster/work/sachan/wangjun/model/finetuned_stable-diffusion", weight_name="pytorch_lora_weights.safetensors")
File "/cluster/project/sachan/wangjun/anaconda3/envs/stable-diffusion/lib/python3.11/site-packages/diffusers/loaders/lora_pipeline.py", line 1289, in load_lora_weights
raise ValueError("Invalid LoRA checkpoint.")
ValueError: Invalid LoRA checkpoint.
I wonder how to fix this?
Beta Was this translation helpful? Give feedback.
All reactions