We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 12f5c59 commit 5e722cdCopy full SHA for 5e722cd
src/diffusers/models/modeling_utils.py
@@ -319,8 +319,7 @@ def save_pretrained(
319
quantization_serializable = (
320
hf_quantizer is not None and isinstance(hf_quantizer, DiffusersQuantizer) and hf_quantizer.is_serializable
321
)
322
-
323
- if hf_quantizer is not None and not quantization_serializable:
+ if not quantization_serializable:
324
raise ValueError(
325
f"The model is quantized with {hf_quantizer.quantization_config.quant_method} and is not serializable - check out the warnings from"
326
" the logger on the traceback to understand the reason why the quantized model is not serializable."
0 commit comments