[Core] Support single file from `from_pretrained`
What does this PR do?
Fixes https://github.com/huggingface/diffusers/issues/6461.
@DN6, some considerations I kept in mind:
- I didn't introduce
from_single_filekwarg infrom_pretrained(). - My reasoning is as follows: users are already familiar with the
from_single_file()method and they know that they can either pass the local filepath or a URL. This workflow is quite well-known at this point in time. - So, I don't think it makes sense to deviate from this and tackle it with a combination of
repo_idandweight_namelike how it's done inload_lora_weights().load_lora_weights()also supports passing a direct local path of the LoRA file, though.
So, in a sense, from_pretrained()'s behavior is not deviating from from_single_file() in terms of how from_pretrained() is being called. WDYT?
TODO
- [ ] Add deprecation cycle to
from_single_file() - [ ] Tests
- [ ] Documentation
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.
Gently pinging @DN6 @yiyixuxu here.
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.
Please note that issues that do not follow the contributing guidelines are likely to be ignored.
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.
Please note that issues that do not follow the contributing guidelines are likely to be ignored.
Closing this. Cc: @DN6