Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Ilyas Moutawwakil <[email protected]>
  • Loading branch information
eaidova and IlyasMoutawwakil authored Jan 30, 2025
1 parent d8585db commit a9a64c6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/openvino/test_diffusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ def test_compare_to_diffusers_pipeline(self, model_arch: str):
height, width, batch_size = 64, 64, 1
inputs = self.generate_inputs(height=height, width=width, batch_size=batch_size)
ov_pipeline = self.OVMODEL_CLASS.from_pretrained(MODEL_NAMES[model_arch])
diffusers_pipeline = DiffusionPipeline.from_pretrained(MODEL_NAMES[model_arch])
auto_cls = self.AUTOMODEL_CLASS if model_arch != "sana" else DiffusionPipeline
diffusers_pipeline = auto_cls.from_pretrained(MODEL_NAMES[model_arch])

for output_type in ["latent", "np", "pt"]:
inputs["output_type"] = output_type
Expand Down Expand Up @@ -179,7 +180,8 @@ def __call__(self, *args, **kwargs) -> None:
auto_callback = Callback()

ov_pipe = self.OVMODEL_CLASS.from_pretrained(MODEL_NAMES[model_arch])
auto_pipe = DiffusionPipeline.from_pretrained(MODEL_NAMES[model_arch])
auto_cls = self.AUTOMODEL_CLASS if model_arch != "sana" else DiffusionPipeline
auto_pipe = auto_cls.from_pretrained(MODEL_NAMES[model_arch])

# callback_steps=1 to trigger callback every step
ov_pipe(**inputs, callback=ov_callback, callback_steps=1)
Expand Down

0 comments on commit a9a64c6

Please sign in to comment.