diff --git a/modules/AutoGPTQ_loader.py b/modules/AutoGPTQ_loader.py index 46a8e73..ac0a04d 100644 --- a/modules/AutoGPTQ_loader.py +++ b/modules/AutoGPTQ_loader.py @@ -16,7 +16,7 @@ def load_quantized(model_name): found_pts = list(path_to_model.glob("*.pt")) found_safetensors = list(path_to_model.glob("*.safetensors")) if len(found_safetensors) > 0: - if len(found_pts) > 1: + if len(found_safetensors) > 1: logging.warning('More than one .safetensors model has been found. The last one will be selected. It could be wrong.') use_safetensors = True diff --git a/modules/GPTQ_loader.py b/modules/GPTQ_loader.py index a223f41..b4f4dac 100644 --- a/modules/GPTQ_loader.py +++ b/modules/GPTQ_loader.py @@ -133,7 +133,7 @@ def find_quantized_model_file(model_name): pt_path = found_pts[-1] elif len(found_safetensors) > 0: - if len(found_pts) > 1: + if len(found_safetensors) > 1: logging.warning('More than one .safetensors model has been found. The last one will be selected. It could be wrong.') pt_path = found_safetensors[-1]