From 12e49acbce800606b8f7055cfe56192fc286aa67 Mon Sep 17 00:00:00 2001 From: Disty0 Date: Fri, 9 Feb 2024 18:54:44 +0300 Subject: [PATCH] OpenVINO update to torch 2.2.0 --- CHANGELOG.md | 2 ++ installer.py | 4 ++-- modules/sd_hijack_optimizations.py | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eacdbbd8e..0b2479f72 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,8 @@ *settings -> diffusers* - allow manual install of specific onnx flavor *settings -> onnx* + - **OpenVINO** + - update to `torch 2.2.0` - add `--theme` cli param to force theme on startup - **wiki**: - updated benchmark notes for IPEX and Olive diff --git a/installer.py b/installer.py index 33746b38a..89a72ef07 100644 --- a/installer.py +++ b/installer.py @@ -495,10 +495,10 @@ def check_torch(): install('onnxruntime-openvino', 'onnxruntime-openvino', ignore=True) elif allow_openvino and args.use_openvino: log.info('Using OpenVINO') - torch_command = os.environ.get('TORCH_COMMAND', 'torch==2.1.2 torchvision==0.16.2 --index-url https://download.pytorch.org/whl/cpu') + torch_command = os.environ.get('TORCH_COMMAND', 'torch==2.2.0 torchvision==0.17.0 --index-url https://download.pytorch.org/whl/cpu') install(os.environ.get('OPENVINO_PACKAGE', 'openvino==2023.3.0'), 'openvino') install('onnxruntime-openvino', 'onnxruntime-openvino', ignore=True) # TODO openvino: numpy version conflicts with tensorflow and doesn't support Python 3.11 - install('nncf==2.8.0', 'nncf') + install('nncf==2.8.1', 'nncf') os.environ.setdefault('PYTORCH_TRACING_MODE', 'TORCHFX') os.environ.setdefault('NEOReadDebugKeys', '1') os.environ.setdefault('ClDeviceGlobalMemSizeAvailablePercent', '100') diff --git a/modules/sd_hijack_optimizations.py b/modules/sd_hijack_optimizations.py index 620d4d336..df844d9b1 100644 --- a/modules/sd_hijack_optimizations.py +++ b/modules/sd_hijack_optimizations.py @@ -568,8 +568,8 @@ def find_dynamic_attention_v1_slice_sizes(query_shape, query_element_size, slice class DynamicAttnProcessorV1: r""" dynamically slices attention queries based on query size and slice rate in GB - saves VRAM similar to Sub-Quad on Original backend and it is compatible with HyperTile slicing will not get triggered if the query size is smaller than the slice rate to gain performance + based on AttnProcessor V1 """ def __call__(self, attn, hidden_states: torch.FloatTensor,