From 7e1c5a2e115af41a19a4553cf5ec92ccb37e87d1 Mon Sep 17 00:00:00 2001 From: Disty0 Date: Sun, 28 Apr 2024 12:10:27 +0300 Subject: [PATCH] ZLUDA patch torch only with --use-zluda --- installer.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/installer.py b/installer.py index fa60647a5..ad92c36e3 100644 --- a/installer.py +++ b/installer.py @@ -594,11 +594,12 @@ def check_torch(): if not installed('torch', quiet=True): log.debug(f'Installing torch: {torch_command}') install(torch_command, 'torch torchvision') - try: - from modules.zluda_installer import patch as patch_torch - patch_torch() - except Exception as e: - log.warning(f'ZLUDA: failed to automatically patch torch: {e}') + if args.use_zluda: + try: + from modules.zluda_installer import patch as patch_torch + patch_torch() + except Exception as e: + log.warning(f'ZLUDA: failed to automatically patch torch: {e}') else: try: import torch