-
Couldn't load subscription status.
- Fork 6.5k
Fix regression introduced in #2448 #2551
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The documentation is not available anymore as the PR was closed or merged. |
|
Thanks, @Narsil, for your crazy fast work here. Greatly appreciated. I just have one comment. This indeed fixes the regression, and I think checking the weights filename for |
|
Oh, and sorry, another comment 😅 Since |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks a lot for the test @Narsil, it was very helpful as a repro (and to prevent future regressions, of course) :)
It has some merit, but I feel the complexity of this function has already gone through the roof, so I would avoid changing it without taking the opportunity for refactor. Maybe But that's more than the PR should be responsible for. I'll let core maintainers decide on the best option. |
|
Hey, @Narsil. Sounds good. Thanks so much 🙏 |
|
Hi , @Narsil I use your loaders.py code , try to load LoRA use safetensors format(https://huggingface.co/prompthero/openjourney-lora/tree/main) , File "model_test.py", line 52, in |
|
Do you have the original weights ? |
|
I've gotten the same error trying to load .safetensors loras from https://civitai.com using the updated loaders.py. KeyError Traceback (most recent call last) ~/opt/anaconda3/lib/python3.9/site-packages/diffusers/loaders.py in load_attn_procs(self, pretrained_model_name_or_path_or_dict, **kwargs) KeyError: 'to_k_lora.down.weight' |
|
Are those supposed to work with |
|
I've gotten satisfactory results with a model hosted on https://civitai.com/ and assumed that they could be adjusted by any kind of lora. I only have a vague/superficial idea of the inner workings of this algorithm, so feel free disregard my report if you deem it nonsensical. |
|
@Meander112381442 I don't know either, but I think civitai is using mostly weights in SD format, which just have different names and layouts. So technically you should be able to use them, but I'm not sure where to point you, but probably some stuff has to be modified either here in diffusers or in the lora file. |
|
Hello, Any idea why i got this error too ? |
|
I am guessing it's a file meant for SD and not |
|
I understand, if someone has a script that will convert a lora safetensor to diffuser I'm really interested |
|
I second that. It would be nice if the diffusers library could load files in either format. |
|
Same problem: |
* Fix regression introduced in huggingface#2448 * Style.
|
same problem KeyError: 'to_k_lora.down.weight' |
|
Hey - thanks for the ping everybody! Could we maybe open a new issue for #2551 (comment) - this is not what was fixed in this PR. If I understand correctly the request here is to be able to load checkpoints trained with: https://github.com/cloneofsimo/lora into This will require some more changes to |
* Fix regression introduced in huggingface#2448 * Style.
* Fix regression introduced in huggingface#2448 * Style.
* Fix regression introduced in huggingface#2448 * Style.
Fix #2448
This will try to load safetensors from filename, only if the extension
matches
.safetensors.