Skip to content

Commit

Permalink
Fix messed up logging with OpenVINO
Browse files Browse the repository at this point in the history
  • Loading branch information
Disty0 committed Feb 8, 2025
1 parent 59911b7 commit c79d125
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions modules/intel/openvino/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,17 @@
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"):
Expand Down

0 comments on commit c79d125

Please sign in to comment.