From ece8311571f90a2f8ec04eae3e7e341bdfb7a75a Mon Sep 17 00:00:00 2001 From: lakshMan-git00 Date: Mon, 23 Mar 2026 08:47:27 +0545 Subject: [PATCH] Fix: fallback when SageAttention is unavailable (Windows support) Fixes crash when SageAttention is not available (e.g. Windows without Triton). Falls back to default attention instead of raising error. --- nodes_model_loading.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/nodes_model_loading.py b/nodes_model_loading.py index 4711a5a9..aac1062a 100644 --- a/nodes_model_loading.py +++ b/nodes_model_loading.py @@ -1124,9 +1124,11 @@ def loadmodel(self, model, base_precision, load_device, quantization, if "sage" in attention_mode: try: from sageattention import sageattn - except Exception as e: - raise ValueError(f"Can't import SageAttention: {str(e)}") - + use_sageattn = True + except ImportError as e: + print(f"SageAttention is not available ->falling back to default attention: {e}") + use_sageattn = False + gguf = False if model.endswith(".gguf"): if quantization != "disabled":