-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Restore compatibility with deprecated StableDiffusionOnnxPipeline
#1191
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,6 +18,7 @@ | |
|
|
||
|
|
||
| class OnnxStableDiffusionPipeline(DiffusionPipeline): | ||
| vae_encoder: OnnxRuntimeModel | ||
| vae_decoder: OnnxRuntimeModel | ||
| text_encoder: OnnxRuntimeModel | ||
| tokenizer: CLIPTokenizer | ||
|
|
@@ -268,6 +269,7 @@ def __call__( | |
| class StableDiffusionOnnxPipeline(OnnxStableDiffusionPipeline): | ||
| def __init__( | ||
| self, | ||
| vae_encoder: OnnxRuntimeModel, | ||
| vae_decoder: OnnxRuntimeModel, | ||
| text_encoder: OnnxRuntimeModel, | ||
| tokenizer: CLIPTokenizer, | ||
|
|
@@ -279,6 +281,7 @@ def __init__( | |
| deprecation_message = "Please use `OnnxStableDiffusionPipeline` instead of `StableDiffusionOnnxPipeline`." | ||
| deprecate("StableDiffusionOnnxPipeline", "1.0.0", deprecation_message) | ||
| super().__init__( | ||
| vae_encoder=vae_encoder, | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Alt 2/2:
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. None would work with **kwargs as well 👍
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not able to make In addition, omitting So I'd be inclined to leave it as it is here. You are welcome to take another look though :) |
||
| vae_decoder=vae_decoder, | ||
| text_encoder=text_encoder, | ||
| tokenizer=tokenizer, | ||
|
|
||
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.
Alt 1/2: remove this line
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.
Yes, the old pipeline didn't have an encoder, so let's remove and substitute it with **kwargs