Can't not load the model
#1
by
ChoCho66
- opened
If I use
from diffusers import DiffusionPipeline
pipe = DiffusionPipeline.from_pretrained("Bakanayatsu/Pony-Diffusion-V6-XL-for-Anime")
pipe.load_lora_weights("LyliaEngine/Pony_Diffusion_V6_XL")
then I will get
ValueError: Provided path contains more than one weights file in the .safetensors format. Either specify `weight_name` in `load_lora_weights` or make sure there's only one `.safetensors` or `.bin` file in LyliaEngine/Pony_Diffusion_V6_XL.
So I use
pipe.load_lora_weights("LyliaEngine/Pony_Diffusion_V6_XL",
weight_name = "ponyDiffusionV6XL_v6StartWithThisOne.safetensors",
)
but I get
ValueError: Invalid LoRA checkpoint.
My pip show diffusers
is
Name: diffusers
Version: 0.31.0.dev0
Summary: State-of-the-art diffusion in PyTorch and JAX.
Home-page: https://github.com/huggingface/diffusers
Author: The Hugging Face team (past and future) with the help of all our contributors (https://github.com/huggingface/diffusers/graphs/contributors)
Author-email: diffusers@huggingface.co
License: Apache 2.0 License
Location: /home/kycho/.local/lib/python3.12/site-packages
Requires: filelock, huggingface-hub, importlib-metadata, numpy, Pillow, regex, requests, safetensors
Required-by: autotrain-advanced
Note: you may need to restart the kernel to use updated packages.
If I use
from diffusers import DiffusionPipeline pipe = DiffusionPipeline.from_pretrained("Bakanayatsu/Pony-Diffusion-V6-XL-for-Anime") pipe.load_lora_weights("LyliaEngine/Pony_Diffusion_V6_XL")
then I will get
ValueError: Provided path contains more than one weights file in the .safetensors format. Either specify `weight_name` in `load_lora_weights` or make sure there's only one `.safetensors` or `.bin` file in LyliaEngine/Pony_Diffusion_V6_XL.
So I use
pipe.load_lora_weights("LyliaEngine/Pony_Diffusion_V6_XL", weight_name = "ponyDiffusionV6XL_v6StartWithThisOne.safetensors", )
but I get
ValueError: Invalid LoRA checkpoint.
My
pip show diffusers
isName: diffusers Version: 0.31.0.dev0 Summary: State-of-the-art diffusion in PyTorch and JAX. Home-page: https://github.com/huggingface/diffusers Author: The Hugging Face team (past and future) with the help of all our contributors (https://github.com/huggingface/diffusers/graphs/contributors) Author-email: diffusers@huggingface.co License: Apache 2.0 License Location: /home/kycho/.local/lib/python3.12/site-packages Requires: filelock, huggingface-hub, importlib-metadata, numpy, Pillow, regex, requests, safetensors Required-by: autotrain-advanced Note: you may need to restart the kernel to use updated packages.
Oh, it isn't in diffusers format so you can't use from_pretrained. Also, the model isn't a LoRA.
I'd suggest you use
pipe = StableDiffusionXLPipeline.from_single_file("LyliaEngine/Pony_Diffusion_V6_XL")
This will do the automatic conversion to diffusers format and load the model.