diff --git a/modules/intel/openvino/__init__.py b/modules/intel/openvino/__init__.py index f2681d134..d6dd73567 100644 --- a/modules/intel/openvino/__init__.py +++ b/modules/intel/openvino/__init__.py @@ -23,6 +23,17 @@ import functools from modules import shared, devices, sd_models +# importing openvino.runtime forces DeprecationWarning to "always" +# And Intel's own libs (NNCF) imports the deprecated module +# Reset the warnings back to ignore: +try: + import warnings + import openvino.runtime # pylint: disable=unused-import + warnings.filterwarnings(action="ignore", category=DeprecationWarning) +except Exception: + pass + + torch._dynamo.config.cache_size_limit = 64 # pylint: disable=protected-access torch._dynamo.eval_frame.check_if_dynamo_supported = lambda: True # pylint: disable=protected-access if hasattr(torch._dynamo.config, "inline_inbuilt_nn_modules"):