From acc3d6a2eac4fa2ef3890bfcc4b4a92962ff0dc1 Mon Sep 17 00:00:00 2001 From: patientx Date: Fri, 30 Aug 2024 20:13:28 +0300 Subject: [PATCH] Update model_management.py --- comfy/model_management.py | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/comfy/model_management.py b/comfy/model_management.py index 7774e72b3..518d2cb82 100644 --- a/comfy/model_management.py +++ b/comfy/model_management.py @@ -270,26 +270,26 @@ def get_torch_device_name(device): return "CUDA {}: {}".format(device, torch.cuda.get_device_name(device)) try: - logging.info("Device: {}".format(get_torch_device_name(get_torch_device()))) + torch_device_name = get_torch_device_name(get_torch_device()) + + + + if "[ZLUDA]" in torch_device_name: + print("***----------------------ZLUDA--------------------------***") + print(" :: ZLUDA detected, disabling non-supported functions.") + + if torch.backends.cudnn.enabled: + torch.backends.cudnn.enabled = False + print(" :: cuDNN , flash_sdp , mem_efficient_sdp disabled") + + torch.backends.cuda.enable_flash_sdp(False) + torch.backends.cuda.enable_math_sdp(True) + torch.backends.cuda.enable_mem_efficient_sdp(False) + print("***-----------------------------------------------------***") + + print("Device:", torch_device_name) except: - logging.warning("Could not pick default device.") - - - - - - - - - - - - - - - - - + print("Could not pick default device.") current_loaded_models = []