From 995c07341ebf7a7f4103646e41b656a71d3c113e Mon Sep 17 00:00:00 2001 From: Christopher Anderson Date: Fri, 24 Oct 2025 18:47:05 +1100 Subject: [PATCH] Replace TORCH_BACKENDS_CUDNN_ENABLED with TORCH_AMD_CUDNN_ENABLED (more accurate) --- comfy/model_management.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/comfy/model_management.py b/comfy/model_management.py index ff84af4c5..d4dc813f8 100644 --- a/comfy/model_management.py +++ b/comfy/model_management.py @@ -336,11 +336,11 @@ AMD_RDNA2_AND_OLDER_ARCH = ["gfx1030", "gfx1031", "gfx1010", "gfx1011", "gfx1012 try: arch = torch.cuda.get_device_properties(get_torch_device()).gcnArchName if not (any((a in arch) for a in AMD_RDNA2_AND_OLDER_ARCH)): - torch.backends.cudnn.enabled = os.environ.get("TORCH_BACKENDS_CUDNN_ENABLED", "0").strip().lower() not in { + torch.backends.cudnn.enabled = os.environ.get("TORCH_AMD_CUDNN_ENABLED", "0").strip().lower() not in { "0", "off", "false", "disable", "disabled", "no"} if not torch.backends.cudnn.enabled: logging.info( - "ComfyUI has set torch.backends.cudnn.enabled to False for better AMD performance. Set environment var TORCH_BACKENDS_CUDDNN_ENABLED=1 to enable it again.") + "ComfyUI has set torch.backends.cudnn.enabled to False for better AMD performance. Set environment var TORCH_AMD_CUDDNN_ENABLED=1 to enable it again.") try: rocm_version = tuple(map(int, str(torch.version.hip).split(".")[:2]))