Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d293c56

Browse files
committedJan 30, 2025·
autocls with if else in tests
1 parent d0e2ab3 commit d293c56

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎tests/openvino/test_diffusion.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ def test_load_vanilla_model_which_is_not_supported(self):
104104
@parameterized.expand(SUPPORTED_ARCHITECTURES)
105105
@require_diffusers
106106
def test_ov_pipeline_class_dispatch(self, model_arch: str):
107-
auto_pipeline = DiffusionPipeline.from_pretrained(MODEL_NAMES[model_arch])
107+
auto_cls = self.AUTOMODEL_CLASS if model_arch != "sana" else DiffusionPipeline
108+
auto_pipeline = auto_cls.from_pretrained(MODEL_NAMES[model_arch])
108109
ov_pipeline = self.OVMODEL_CLASS.from_pretrained(MODEL_NAMES[model_arch])
109110

110111
self.assertEqual(ov_pipeline.auto_model_class, auto_pipeline.__class__)

0 commit comments

Comments
 (0)
Please sign in to comment.