mirror of
https://github.com/vladmandic/automatic
synced 2026-08-26 15:16:01 +02:00
SDNQ fix quantization_device getting ignored on post load quant
This commit is contained in:
@@ -396,11 +396,10 @@ def sdnq_quantize_layer(layer, weights_dtype="int8", quantized_matmul_dtype=None
|
||||
return layer
|
||||
use_quantized_matmul = use_quantized_matmul_conv
|
||||
|
||||
layer.weight.requires_grad = False
|
||||
layer.weight.requires_grad_(False)
|
||||
if return_device is None:
|
||||
return_device = layer.weight.device
|
||||
if quantization_device is None:
|
||||
quantization_device = layer.weight.device
|
||||
if quantization_device is not None:
|
||||
layer.weight.data = layer.weight.to(quantization_device, non_blocking=non_blocking)
|
||||
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user