Skip to content

Commit 614c182

Browse files
authored
Restore compatibility with deprecated StableDiffusionOnnxPipeline (huggingface#1191)
* Restore compatibility with old ONNX pipeline. I think it broke in huggingface#552. * Add missing attribute `vae_encoder`
1 parent 11f7d6f commit 614c182

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919

2020
class OnnxStableDiffusionPipeline(DiffusionPipeline):
21+
vae_encoder: OnnxRuntimeModel
2122
vae_decoder: OnnxRuntimeModel
2223
text_encoder: OnnxRuntimeModel
2324
tokenizer: CLIPTokenizer
@@ -268,6 +269,7 @@ def __call__(
268269
class StableDiffusionOnnxPipeline(OnnxStableDiffusionPipeline):
269270
def __init__(
270271
self,
272+
vae_encoder: OnnxRuntimeModel,
271273
vae_decoder: OnnxRuntimeModel,
272274
text_encoder: OnnxRuntimeModel,
273275
tokenizer: CLIPTokenizer,
@@ -279,6 +281,7 @@ def __init__(
279281
deprecation_message = "Please use `OnnxStableDiffusionPipeline` instead of `StableDiffusionOnnxPipeline`."
280282
deprecate("StableDiffusionOnnxPipeline", "1.0.0", deprecation_message)
281283
super().__init__(
284+
vae_encoder=vae_encoder,
282285
vae_decoder=vae_decoder,
283286
text_encoder=text_encoder,
284287
tokenizer=tokenizer,

0 commit comments

Comments
 (0)