-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[LoRA] make LoRAs trained with peft
loadable when peft
isn't installed
#6306
Conversation
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
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.
Makes sense, thanks! DO we need the same for other training scripts as well? Can you confirm the slow tests pass on a V100 instance?
@younesbelkada hence the TODO here: #6306 (comment).
Which ones? Can you pinpoint? |
Ran RUN_SLOW=1 pytest tests/lora/test_lora_layers_peft.py Works. |
@pacman100 could you also give it a look? |
Makes sense! As a general guideline, for now let's try to always have the exact same serialization format that we had before using PEFT in the example scritps |
…alled (huggingface#6306) * spit diffusers-native format from the get go. * rejig the peft_to_diffusers mapping.
* add to dreambooth lora. * add: t2i lora. * add: sdxl t2i lora. * style * lcm lora sdxl. * unwrap * fix: enable_adapters().
…alled (huggingface#6306) * spit diffusers-native format from the get go. * rejig the peft_to_diffusers mapping.
* add to dreambooth lora. * add: t2i lora. * add: sdxl t2i lora. * style * lcm lora sdxl. * unwrap * fix: enable_adapters().
…alled (huggingface#6306) * spit diffusers-native format from the get go. * rejig the peft_to_diffusers mapping.
* add to dreambooth lora. * add: t2i lora. * add: sdxl t2i lora. * style * lcm lora sdxl. * unwrap * fix: enable_adapters().
What does this PR do?
Reported by @apolinario. Internal thread: https://huggingface.slack.com/archives/C05GX934Z98/p1703334768186119.
Currently, our LoRA trainers use
peft
. To load those LoRAs you needpeft
to be installed. However, we want those LoRAs to be loadable withoutpeft
too (or so I'd think?).This PR fixes that.
peft
: https://colab.research.google.com/gist/sayakpaul/cc0886ada3ecdd5c3b305cf9862d2c72/scratchpad.ipynbpeft
isn't installed: https://colab.research.google.com/gist/sayakpaul/41c60a6bfb921108faf572508bc15469/scratchpad.ipynb@apolinario does this work for you?
TODO