mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 09:14:35 +02:00
Cleanup
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user