-
Notifications
You must be signed in to change notification settings - Fork 6.1k
[ONNX] Don't download ONNX model by default #4338
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. |
@@ -1411,6 +1412,9 @@ def download(cls, pretrained_model_name, **kwargs) -> Union[str, os.PathLike]: | |||
): | |||
ignore_patterns = ["*.bin", "*.msgpack"] | |||
|
|||
if not use_onnx: |
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.
Should this be set by default for all the OnnxStableDiffusionXxxPipeline
?
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, thanks for the fix!
* [Download] Don't download ONNX weights by default * [Download] Don't download ONNX weights by default * [Download] Don't download ONNX weights by default * fix more * finish * finish * finish
Hey @sayakpaul , in
proposed (added use_onnx=use_onnx,):
|
* [Download] Don't download ONNX weights by default * [Download] Don't download ONNX weights by default * [Download] Don't download ONNX weights by default * fix more * finish * finish * finish
* [Download] Don't download ONNX weights by default * [Download] Don't download ONNX weights by default * [Download] Don't download ONNX weights by default * fix more * finish * finish * finish
* [Download] Don't download ONNX weights by default * [Download] Don't download ONNX weights by default * [Download] Don't download ONNX weights by default * fix more * finish * finish * finish
Hey @JacquiML, Good point! Would you like to open a PR for this? |
sure :) |
* [Download] Don't download ONNX weights by default * [Download] Don't download ONNX weights by default * [Download] Don't download ONNX weights by default * fix more * finish * finish * finish
* [Download] Don't download ONNX weights by default * [Download] Don't download ONNX weights by default * [Download] Don't download ONNX weights by default * fix more * finish * finish * finish
What does this PR do?
This PR makes sure that ONNX weights are only ever by default downloaded by ONNX pipelines, but not any PyTorch pipelines.
The user is also given the option to have more fine-grained control via a
use_onnx
download argument.