From 2351efb8f70e5ff99d30307c850d56b1505b41b0 Mon Sep 17 00:00:00 2001 From: Disty0 Date: Thu, 29 May 2025 14:58:00 +0300 Subject: [PATCH] Remove redundant shape check --- modules/model_quant_sdnq.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/model_quant_sdnq.py b/modules/model_quant_sdnq.py index 894d7e18b..a8839d7ab 100644 --- a/modules/model_quant_sdnq.py +++ b/modules/model_quant_sdnq.py @@ -327,7 +327,7 @@ def int8_matmul( def quantized_linear_forward_fp8_matmul(self, input: torch.FloatTensor) -> torch.FloatTensor: - if input.shape[-1] % 16 != 0 or self.weight.shape[0] % 16 != 0 or self.weight.shape[1] % 16 != 0: + if self.weight.shape[0] % 16 != 0 or self.weight.shape[1] % 16 != 0: return torch.nn.functional.linear(input, self.sdnq_decompressor(self.weight, skip_quantized_matmul=True), self.bias) return fp8_matmul(input, self.weight, self.bias, self.sdnq_decompressor.scale)