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 pretrained] Allow returning local path #1450
Conversation
@@ -585,6 +560,33 @@ def load_module(name, value): | |||
f"Keyword arguments {unused_kwargs} are not expected by {pipeline_class.__name__} and will be ignored." | |||
) | |||
|
|||
if low_cpu_mem_usage and not is_accelerate_available(): |
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.
this is not used for downloading the model, but just for loading the classes
53ddd71
to
fb23cd5
Compare
The documentation is not available anymore as the PR was closed or merged. |
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.
LGTM! This should probably be in the flax pipeline as well, to keep them in sync
This gets the job done with minimal disruption to the existing API. But methods that don't have a consistent return type are real hard to type-check and use consistently. Alternatives could be:
|
Think in the future we could have |
Allow returning local path
Allow returning local path
Allow returning local path
It is a common use case to want to know exactly where the pipeline was downloaded. This PR adds a simply kwarg
return_cached_folder
to see this. It could help with issues such as: