From 0240b72895a3398d9edd5d0b36b9499000eefcbf Mon Sep 17 00:00:00 2001 From: Concedo <39025047+LostRuins@users.noreply.github.com> Date: Sat, 11 Jul 2026 22:15:16 +0800 Subject: [PATCH] add script working dir to convert script --- convert_hf_to_gguf.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/convert_hf_to_gguf.py b/convert_hf_to_gguf.py index 3b23d5ebc..6eab0c23c 100755 --- a/convert_hf_to_gguf.py +++ b/convert_hf_to_gguf.py @@ -11,6 +11,10 @@ from pathlib import Path import torch +script_dir = os.path.dirname(os.path.abspath(__file__)) +if script_dir not in sys.path: + sys.path.append(script_dir) + if 'NO_LOCAL_GGUF' not in os.environ: sys.path.insert(1, str(Path(__file__).parent / 'gguf-py')) import gguf