From 655f6d2e284738fefa4e82afbab88fe8b6f26308 Mon Sep 17 00:00:00 2001 From: IlyasMoutawwakil Date: Fri, 10 Jan 2025 17:13:12 +0100 Subject: [PATCH] remove diff compatibility error --- optimum/exporters/tasks.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/optimum/exporters/tasks.py b/optimum/exporters/tasks.py index 6afe17a369..b15c1fe070 100644 --- a/optimum/exporters/tasks.py +++ b/optimum/exporters/tasks.py @@ -29,12 +29,7 @@ from transformers import AutoConfig, PretrainedConfig, is_tf_available, is_torch_available from transformers.utils import SAFE_WEIGHTS_NAME, TF2_WEIGHTS_NAME, WEIGHTS_NAME, logging -from ..utils.import_utils import ( - is_diffusers_available, - is_diffusers_version, - is_onnx_available, - is_transformers_version, -) +from ..utils.import_utils import is_diffusers_available, is_onnx_available if TYPE_CHECKING: @@ -56,12 +51,6 @@ from transformers import TFPreTrainedModel if is_diffusers_available(): - if is_diffusers_version(">=", "0.32.0") and is_transformers_version("<", "4.41.2"): - raise ImportError( - "The current version of `diffusers` requires `transformers>=4.41.2`." - " Please upgrade to the latest version of Transformers." - ) - from diffusers import DiffusionPipeline from diffusers.pipelines.auto_pipeline import ( AUTO_IMAGE2IMAGE_PIPELINES_MAPPING,