Skip to content

Commit 6ddf49f

Browse files
committed
updated path to gguf package for non-installed setups
1 parent ee7136c commit 6ddf49f

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

gguf-py/gguf/scripts/gguf_convert_endian.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
import numpy as np
1212

1313
# Necessary to load the local gguf package
14-
if "NO_LOCAL_GGUF" not in os.environ and (Path(__file__).parent.parent.parent / 'gguf-py').exists():
15-
sys.path.insert(0, str(Path(__file__).parent.parent))
14+
if "NO_LOCAL_GGUF" not in os.environ and (Path(__file__).parent.parent.parent.parent / 'gguf-py').exists():
15+
sys.path.insert(0, str(Path(__file__).parent.parent.parent))
1616

1717
import gguf
1818

gguf-py/gguf/scripts/gguf_dump.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
import numpy as np
1313

1414
# Necessary to load the local gguf package
15-
if "NO_LOCAL_GGUF" not in os.environ and (Path(__file__).parent.parent.parent / 'gguf-py').exists():
16-
sys.path.insert(0, str(Path(__file__).parent.parent))
15+
if "NO_LOCAL_GGUF" not in os.environ and (Path(__file__).parent.parent.parent.parent / 'gguf-py').exists():
16+
sys.path.insert(0, str(Path(__file__).parent.parent.parent))
1717

1818
from gguf import GGUFReader, GGUFValueType, ReaderTensor # noqa: E402
1919

gguf-py/gguf/scripts/gguf_hash.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
from tqdm import tqdm
1414

1515
# Necessary to load the local gguf package
16-
if "NO_LOCAL_GGUF" not in os.environ and (Path(__file__).parent.parent.parent / 'gguf-py').exists():
17-
sys.path.insert(0, str(Path(__file__).parent.parent))
16+
if "NO_LOCAL_GGUF" not in os.environ and (Path(__file__).parent.parent.parent.parent / 'gguf-py').exists():
17+
sys.path.insert(0, str(Path(__file__).parent.parent.parent))
1818

1919
from gguf import GGUFReader # noqa: E402
2020

gguf-py/gguf/scripts/gguf_new_metadata.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
from typing import Any, Sequence, NamedTuple
1414

1515
# Necessary to load the local gguf package
16-
if "NO_LOCAL_GGUF" not in os.environ and (Path(__file__).parent.parent.parent / 'gguf-py').exists():
17-
sys.path.insert(0, str(Path(__file__).parent.parent))
16+
if "NO_LOCAL_GGUF" not in os.environ and (Path(__file__).parent.parent.parent.parent / 'gguf-py').exists():
17+
sys.path.insert(0, str(Path(__file__).parent.parent.parent))
1818

1919
import gguf
2020

gguf-py/gguf/scripts/gguf_set_metadata.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
from pathlib import Path
77

88
# Necessary to load the local gguf package
9-
if "NO_LOCAL_GGUF" not in os.environ and (Path(__file__).parent.parent.parent / 'gguf-py').exists():
10-
sys.path.insert(0, str(Path(__file__).parent.parent))
9+
if "NO_LOCAL_GGUF" not in os.environ and (Path(__file__).parent.parent.parent.parent / 'gguf-py').exists():
10+
sys.path.insert(0, str(Path(__file__).parent.parent.parent))
1111

1212
from gguf import GGUFReader # noqa: E402
1313

0 commit comments

Comments
 (0)