Skip to content

Commit 5e722cd

Browse files
committed
quantizer.
1 parent 12f5c59 commit 5e722cd

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/diffusers/models/modeling_utils.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,7 @@ def save_pretrained(
319319
quantization_serializable = (
320320
hf_quantizer is not None and isinstance(hf_quantizer, DiffusersQuantizer) and hf_quantizer.is_serializable
321321
)
322-
323-
if hf_quantizer is not None and not quantization_serializable:
322+
if not quantization_serializable:
324323
raise ValueError(
325324
f"The model is quantized with {hf_quantizer.quantization_config.quant_method} and is not serializable - check out the warnings from"
326325
" the logger on the traceback to understand the reason why the quantized model is not serializable."

0 commit comments

Comments
 (0)