From ad2a4ad616f43e318da3687f3ec2f421371814a7 Mon Sep 17 00:00:00 2001 From: Disty0 Date: Thu, 5 Jun 2025 13:38:04 +0300 Subject: [PATCH] Cleanup --- 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 dbf0cfa4f..b084df453 100644 --- a/modules/model_quant_sdnq.py +++ b/modules/model_quant_sdnq.py @@ -405,7 +405,7 @@ def quantize_fp8_matmul_input_tensorwise(input: torch.FloatTensor, scale: torch. return input, scale -def quantize_int8_matmul_input(input: torch.FloatTensor, scale: torch.FloatTensor, flatten: bool = True) -> Tuple[torch.ByteTensor, torch.FloatTensor]: +def quantize_int8_matmul_input(input: torch.FloatTensor, scale: torch.FloatTensor) -> Tuple[torch.ByteTensor, torch.FloatTensor]: input = input.flatten(0,-2).contiguous() input_scale = torch.div(input.abs().amax(dim=-1, keepdims=True), 127) input = torch.div(input, input_scale).round_().clamp_(-128, 127).to(torch.int8)