From 9adf20a47caf8433c85654693d033e5bb99467a9 Mon Sep 17 00:00:00 2001 From: Disty0 Date: Thu, 21 May 2026 17:22:45 +0300 Subject: [PATCH] fix asym quant with hadamard --- modules/sdnq/dequantizer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/sdnq/dequantizer.py b/modules/sdnq/dequantizer.py index b6d259876..afaf2781c 100644 --- a/modules/sdnq/dequantizer.py +++ b/modules/sdnq/dequantizer.py @@ -29,10 +29,10 @@ def dequantize_asymmetric(weight: torch.ByteTensor, scale: torch.FloatTensor, ze result = result.add_(torch.mm(svd_up, svd_down).unflatten(-1, (*result.shape[1:],))) else: result = result.to(dtype=svd_up.dtype).addmm_(svd_up, svd_down) - if hadamard is not None: - result = rotate_hadamard(result, hadamard=hadamard, is_conv=is_conv) if dtype is not None: result = result.to(dtype=dtype) + if hadamard is not None: + result = rotate_hadamard(result, hadamard=hadamard, is_conv=is_conv) return result