From f46493cafbfe35f3b34fcdae6e82ed857d0049d1 Mon Sep 17 00:00:00 2001 From: IlyasMoutawwakil Date: Fri, 12 Jul 2024 17:22:59 +0200 Subject: [PATCH] misc --- optimum/exporters/tasks.py | 4 +++- optimum/utils/import_utils.py | 2 +- tests/exporters/exporters_utils.py | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/optimum/exporters/tasks.py b/optimum/exporters/tasks.py index e2cfa465d0..eafb65ba8b 100644 --- a/optimum/exporters/tasks.py +++ b/optimum/exporters/tasks.py @@ -305,7 +305,9 @@ class TasksManager: "vision2seq-lm": "image-to-text", "zero-shot-classification": "text-classification", "image-feature-extraction": "feature-extraction", - # for backward compatibility + # for backward compatibility and testing (where + # model task and model type are still the same) + "lcm": "text-to-image", "stable-diffusion": "text-to-image", "stable-diffusion-xl": "text-to-image", } diff --git a/optimum/utils/import_utils.py b/optimum/utils/import_utils.py index a5df9e2624..4a57fda79c 100644 --- a/optimum/utils/import_utils.py +++ b/optimum/utils/import_utils.py @@ -50,7 +50,7 @@ def _is_package_available(pkg_name: str, return_version: bool = False) -> Union[ TORCH_MINIMUM_VERSION = version.parse("1.11.0") TRANSFORMERS_MINIMUM_VERSION = version.parse("4.25.0") -DIFFUSERS_MINIMUM_VERSION = version.parse("0.18.0") +DIFFUSERS_MINIMUM_VERSION = version.parse("0.22.0") AUTOGPTQ_MINIMUM_VERSION = version.parse("0.4.99") # Allows 0.5.0.dev0 diff --git a/tests/exporters/exporters_utils.py b/tests/exporters/exporters_utils.py index 254cd40194..2da5a76713 100644 --- a/tests/exporters/exporters_utils.py +++ b/tests/exporters/exporters_utils.py @@ -297,6 +297,7 @@ PYTORCH_DIFFUSION_MODEL = { "stable-diffusion": "hf-internal-testing/tiny-stable-diffusion-torch", "stable-diffusion-xl": "echarlaix/tiny-random-stable-diffusion-xl", + "lcm": "echarlaix/tiny-random-latent-consistency", } PYTORCH_TIMM_MODEL = {