aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordotpy314 <33351922+dotpy314@users.noreply.github.com>2023-03-28 23:06:28 +0800
committerGitHub <noreply@github.com>2023-03-28 18:06:28 +0300
commit28ba975aea1dcae2f31770516f5d542ff177771e (patch)
treecfc8dc0302c6df2bdd31c414d7058efa5c6a9b5f
parenta6bdc47cba23713a22ade47dd65b6afeb8009ff4 (diff)
Check the existence of f16_model_path_base in quantize.py (#574)
Co-authored-by: Jincheng Miao <jincheng.miao@gmail.com>
-rw-r--r--quantize.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/quantize.py b/quantize.py
index 16b5963..641df8d 100644
--- a/quantize.py
+++ b/quantize.py
@@ -74,6 +74,10 @@ def main():
args.models_path, model, "ggml-model-f16.bin"
)
+ if not os.path.isfile(f16_model_path_base):
+ print(f'The file %s was not found' % f16_model_path_base)
+ sys.exit(1)
+
f16_model_parts_paths = map(
lambda filename: os.path.join(f16_model_path_base, filename),
glob.glob(f"{f16_model_path_base}*")