-
Notifications
You must be signed in to change notification settings - Fork 6.1k
[LoRA] relax lora loading logic #4610
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. |
|
||
targeted_files = list(filter(lambda x: "scheduler" not in x and "optimizer" not in x, targeted_files)) | ||
if len(targeted_files) > 1: | ||
raise ValueError( |
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.
WDYT if this is a warning not a raise
, and we pick the first one? Not a strong opinion tho.
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.
Better to raise an error than leaving it silent IMO. This promotes a sense to structuring the Hub repos too IMO.
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.
Fair. I thought about doing just a warning and still trying the best guess, like "we picked this, if you meant another one, improve your repo"
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.
Example use-case where this is useful: https://huggingface.co/Linaqruf/pastel-anime-xl-lora/tree/main
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.
Sure. But I think we need to meet at a common point and I would prefer the current design to promote what I said in the earlier comment.
Co-authored-by: apolinário <[email protected]>
@williamberman could you give this a look? |
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.
Nice! Looks good to me
@patrickvonplaten possible to give another thorough look. Had to change a few minor things to make everything work. |
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.
Nice!
* relax lora loading logic. * cater to the other cases too. * fix: variable name * bring the chaos down. * check * deal with checkpointed files. * Apply suggestions from code review Co-authored-by: apolinário <[email protected]> * style --------- Co-authored-by: apolinário <[email protected]>
* relax lora loading logic. * cater to the other cases too. * fix: variable name * bring the chaos down. * check * deal with checkpointed files. * Apply suggestions from code review Co-authored-by: apolinário <[email protected]> * style --------- Co-authored-by: apolinário <[email protected]>
Internal discussion thread: https://huggingface.slack.com/archives/C03UQJENJTV/p1692016705461479.
Tested with the following:
Todo