From fb91c07191301688490ea500d4ac5ca9618e6b6c Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Wed, 17 May 2023 11:16:37 -0300 Subject: [PATCH] Minor bug fix --- modules/AutoGPTQ_loader.py | 2 +- modules/GPTQ_loader.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/AutoGPTQ_loader.py b/modules/AutoGPTQ_loader.py index 46a8e736..ac0a04dc 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 a223f41a..b4f4dac7 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]