From d9bc31e7daa33c9c3d3df820a3a37c464b8c7294 Mon Sep 17 00:00:00 2001 From: Disty0 Date: Sat, 29 Nov 2025 01:46:04 +0300 Subject: [PATCH] Cleanup --- modules/sdnq/loader.py | 2 +- modules/sdnq/quantizer.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/sdnq/loader.py b/modules/sdnq/loader.py index 9120dd19d..7593c505c 100644 --- a/modules/sdnq/loader.py +++ b/modules/sdnq/loader.py @@ -207,7 +207,7 @@ def apply_sdnq_options_to_module(model, dtype: torch.dtype = None, dequantize_fp def apply_sdnq_options_to_model(model, dtype: torch.dtype = None, dequantize_fp32: bool = None, use_quantized_matmul: bool = None): if use_quantized_matmul and not use_torch_compile: - raise ValueError("SDNQ Quantized MatMul requires a working Triton install.") + raise RuntimeError("SDNQ Quantized MatMul requires a working Triton install.") model = apply_sdnq_options_to_module(model, dtype=dtype, dequantize_fp32=dequantize_fp32, use_quantized_matmul=use_quantized_matmul) if hasattr(model, "quantization_config"): if use_quantized_matmul is not None: diff --git a/modules/sdnq/quantizer.py b/modules/sdnq/quantizer.py index 6ac45b58b..954ed106d 100644 --- a/modules/sdnq/quantizer.py +++ b/modules/sdnq/quantizer.py @@ -909,7 +909,7 @@ class SDNQConfig(QuantizationConfigMixin): Safety checker that arguments are correct """ if self.use_quantized_matmul and not use_torch_compile: - raise ValueError("SDNQ Quantized MatMul requires a working Triton install.") + raise RuntimeError("SDNQ Quantized MatMul requires a working Triton install.") if self.weights_dtype not in accepted_weight_dtypes: raise ValueError(f"SDNQ only support weight dtypes in {accepted_weight_dtypes} but found {self.weights_dtype}") if self.quantized_matmul_dtype is not None and self.quantized_matmul_dtype not in accepted_matmul_dtypes: