diff --git a/installer.py b/installer.py index fc93016b8..6f68cf9fa 100644 --- a/installer.py +++ b/installer.py @@ -500,11 +500,6 @@ def check_torch(): try: if args.reinstall_zluda: zluda_installer.uninstall() - if args.use_zluda_dnn: - if zluda_installer.check_dnn_dependency(): - zluda_installer.enable_dnn() - else: - log.warning("Couldn't find the required dependency of ZLUDA DNN.") zluda_path = zluda_installer.get_path() zluda_installer.install(zluda_path) zluda_installer.make_copy(zluda_path) diff --git a/modules/cmd_args.py b/modules/cmd_args.py index 67c96b192..afbe239fe 100644 --- a/modules/cmd_args.py +++ b/modules/cmd_args.py @@ -41,7 +41,6 @@ group.add_argument("--disable-queue", default=os.environ.get("SD_DISABLEQUEUE", group.add_argument('--debug', default=os.environ.get("SD_DEBUG", False), action='store_true', help = "Run installer with debug logging, default: %(default)s") group.add_argument('--use-directml', default=os.environ.get("SD_USEDIRECTML", False), action='store_true', help = "Use DirectML if no compatible GPU is detected, default: %(default)s") group.add_argument('--use-zluda', default=os.environ.get("SD_USEZLUDA", False), action='store_true', help = "Force use ZLUDA, AMD GPUs only, default: %(default)s") -group.add_argument('--use-zluda-dnn', default=os.environ.get("SD_USEZLUDADNN", False), action='store_true', help = "Enable ZLUDA DNN (experimental), requires --use-zluda, AMD GPUs only, Windows only, default: %(default)s") group.add_argument("--use-openvino", default=os.environ.get("SD_USEOPENVINO", False), action='store_true', help="Use Intel OpenVINO backend, default: %(default)s") group.add_argument("--use-ipex", default=os.environ.get("SD_USEIPX", False), action='store_true', help="Force use Intel OneAPI XPU backend, default: %(default)s") group.add_argument("--use-cuda", default=os.environ.get("SD_USECUDA", False), action='store_true', help="Force use nVidia CUDA backend, default: %(default)s") diff --git a/modules/zluda.py b/modules/zluda.py index a1b5fb1f8..b181f60a4 100644 --- a/modules/zluda.py +++ b/modules/zluda.py @@ -27,7 +27,7 @@ def test(device: DeviceLikeType) -> Union[Exception, None]: def initialize_zluda(): device = devices.get_optimal_device() if platform.system() == "Windows" and devices.cuda_ok and is_zluda(device): - torch.backends.cudnn.enabled = shared.cmd_opts.use_zluda_dnn + torch.backends.cudnn.enabled = False torch.backends.cuda.enable_flash_sdp(False) torch.backends.cuda.enable_flash_sdp = do_nothing torch.backends.cuda.enable_math_sdp(True) @@ -35,7 +35,7 @@ def initialize_zluda(): torch.backends.cuda.enable_mem_efficient_sdp(False) torch.backends.cuda.enable_mem_efficient_sdp = do_nothing if hasattr(torch.backends.cuda, "enable_cudnn_sdp"): - torch.backends.cuda.enable_cudnn_sdp(shared.cmd_opts.use_zluda_dnn and shared.cmd_opts.experimental) + torch.backends.cuda.enable_cudnn_sdp(False) torch.backends.cuda.enable_cudnn_sdp = do_nothing shared.opts.sdp_options = ['Math attention'] devices.device_codeformer = devices.cpu diff --git a/modules/zluda_installer.py b/modules/zluda_installer.py index 3d0bb3e11..241f78ae5 100644 --- a/modules/zluda_installer.py +++ b/modules/zluda_installer.py @@ -30,22 +30,6 @@ def find_hip_sdk() -> Union[str, None]: return os.environ.get('HIP_PATH', hip_path_default) -def check_dnn_dependency() -> bool: - if os.environ.get("ZLUDA", None) is None: - return False - hip_path = os.environ.get("HIP_PATH", None) - if hip_path is None: # unable to check - return True - if os.path.exists(os.path.join(hip_path, 'bin', 'MIOpen.dll')): - return True - return False - - -def enable_dnn() -> None: - DLL_MAPPING['cudnn.dll'] = 'cudnn64_8.dll' - HIP_TARGETS.append('MIOpen.dll') - - def install(zluda_path: os.PathLike) -> None: if os.path.exists(zluda_path): return