Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.

Commit f3fbc91

Browse files
committed
Add None check
1 parent c333a78 commit f3fbc91

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torchchat/cli/builder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ def _initialize_model(
569569
device_sync(device=builder_args.device)
570570

571571
cache_path = builder_args.quantized_state_path
572-
quant_checkpoint_exists: bool = os.path.isfile(cache_path)
572+
quant_checkpoint_exists: bool = cache_path and os.path.isfile(cache_path)
573573
if quantize or quant_checkpoint_exists:
574574

575575
if quantize and quant_checkpoint_exists:

0 commit comments

Comments
 (0)