add script working dir to convert script

This commit is contained in:
Concedo 2026-07-11 22:15:16 +08:00
parent 622599d8b5
commit 0240b72895

View file

@ -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