|
17 | 17 | from pathlib import Path |
18 | 18 |
|
19 | 19 | import numpy as np |
20 | | -import pytest |
21 | 20 | import torch |
22 | 21 | from diffusers import ( |
23 | 22 | AutoPipelineForImage2Image, |
|
28 | 27 | from diffusers.pipelines.stable_diffusion import StableDiffusionSafetyChecker |
29 | 28 | from diffusers.utils import load_image |
30 | 29 | from parameterized import parameterized |
31 | | -from transformers.testing_utils import slow |
32 | 30 | from utils_tests import MODEL_NAMES, SEED |
33 | 31 |
|
34 | 32 | from optimum.intel.openvino import ( |
@@ -379,15 +377,10 @@ def test_height_width_properties(self, model_arch: str): |
379 | 377 | self.assertEqual(ov_pipeline.height, height) |
380 | 378 | self.assertEqual(ov_pipeline.width, width) |
381 | 379 |
|
382 | | - @pytest.mark.run_slow |
383 | | - @slow |
384 | 380 | @require_diffusers |
385 | 381 | def test_textual_inversion(self): |
386 | | - # for now we only test for stable-diffusion |
387 | | - # this is very slow and costly to run right now |
388 | | - |
389 | | - model_id = "runwayml/stable-diffusion-v1-5" |
390 | | - ti_id = "sd-concepts-library/cat-toy" |
| 382 | + model_id = "hf-internal-testing/tiny-stable-diffusion-torch" |
| 383 | + ti_id = "katuni4ka/textual_inversion_cat" |
391 | 384 |
|
392 | 385 | inputs = self.generate_inputs() |
393 | 386 | inputs["prompt"] = "A <cat-toy> backpack" |
@@ -623,15 +616,10 @@ def test_height_width_properties(self, model_arch: str): |
623 | 616 | self.assertEqual(ov_pipeline.height, height) |
624 | 617 | self.assertEqual(ov_pipeline.width, width) |
625 | 618 |
|
626 | | - @pytest.mark.run_slow |
627 | | - @slow |
628 | 619 | @require_diffusers |
629 | 620 | def test_textual_inversion(self): |
630 | | - # for now we only test for stable-diffusion |
631 | | - # this is very slow and costly to run right now |
632 | | - |
633 | | - model_id = "runwayml/stable-diffusion-v1-5" |
634 | | - ti_id = "sd-concepts-library/cat-toy" |
| 621 | + model_id = "hf-internal-testing/tiny-stable-diffusion-torch" |
| 622 | + ti_id = "katuni4ka/textual_inversion_cat" |
635 | 623 |
|
636 | 624 | inputs = self.generate_inputs(model_type="stable-diffusion") |
637 | 625 | inputs["prompt"] = "A <cat-toy> backpack" |
@@ -867,15 +855,10 @@ def test_height_width_properties(self, model_arch: str): |
867 | 855 | self.assertEqual(ov_pipeline.height, height) |
868 | 856 | self.assertEqual(ov_pipeline.width, width) |
869 | 857 |
|
870 | | - @pytest.mark.run_slow |
871 | | - @slow |
872 | 858 | @require_diffusers |
873 | 859 | def test_textual_inversion(self): |
874 | | - # for now we only test for stable-diffusion |
875 | | - # this is very slow and costly to run right now |
876 | | - |
877 | | - model_id = "runwayml/stable-diffusion-v1-5" |
878 | | - ti_id = "sd-concepts-library/cat-toy" |
| 860 | + model_id = "hf-internal-testing/tiny-stable-diffusion-torch" |
| 861 | + ti_id = "katuni4ka/textual_inversion_cat" |
879 | 862 |
|
880 | 863 | inputs = self.generate_inputs() |
881 | 864 | inputs["prompt"] = "A <cat-toy> backpack" |
|
0 commit comments