From 13ba6a8a8da50cc884a3bfcaf76db5519ea79ca6 Mon Sep 17 00:00:00 2001 From: Rando717 Date: Tue, 9 Sep 2025 19:30:54 +0200 Subject: [PATCH] Update zluda.py (cleanup print Triton version) compacted, without exception, silent if no version string --- comfy/customzluda/zluda.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/comfy/customzluda/zluda.py b/comfy/customzluda/zluda.py index 5f949891b..978f1a5d6 100644 --- a/comfy/customzluda/zluda.py +++ b/comfy/customzluda/zluda.py @@ -447,12 +447,11 @@ try: import triton.language as tl print(" :: Triton core imported successfully") - # Get triton version, if possible, continue if no version string - try: - version = triton.__version__ + # Detect Triton version, if possible + version = getattr(triton, "__version__", None) + if version: print(f" :: Detected Triton version: {version}") - except AttributeError: - print(" :: Detected Triton version: no info") + # else: do nothing # This needs to be up here, so it can disable cudnn before anything can even think about using it torch.backends.cudnn.enabled = os.environ.get("TORCH_BACKENDS_CUDNN_ENABLED", "1").strip().lower() not in {"0", "off", "false", "disable", "disabled", "no"}