-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
[from_single_file()
]fix: local single file loading.
#5440
Conversation
@@ -2832,6 +2832,7 @@ def from_single_file(cls, pretrained_model_link_or_path, **kwargs): | |||
tokenizer=tokenizer, | |||
original_config_file=original_config_file, | |||
config_files=config_files, | |||
local_files_only=local_files_only, |
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.
We never actually passed it to the method.
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.
Very nice! Thanks for the fix
fix: local single file loading.
fix: local single file loading.
yep, thank you for this info,could specify the path like: "C:\Zero\Python\AIGC\Stable Diffusion WebUI Q v4.4.cache\huggingface\hub\models--openai--clip-vit-large-patch14"? |
fix: local single file loading.
Fixes #5390.
In favor of closing: #5439. Copying over what I said in #5439:
TL;DR: It's a must for the user to locally save the tokenizers and configurations under the same paths (such as "openai/clip-vit-large-patch14") to ensure local_files_only=True works in the right manner.
Here is an end-to-end demonstration of how this should be done:
https://colab.research.google.com/gist/sayakpaul/b086a1089f6723d3aa01b67f77f1ebbc/scratchpad.ipynb