Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1f3156d

Browse filesBrowse files
authored
fix: Check for existence of clip model path (abetlen#1264)
1 parent 2811014 commit 1f3156d
Copy full SHA for 1f3156d

File tree

Expand file treeCollapse file tree

1 file changed

+3
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-0
lines changed

‎llama_cpp/llama_chat_format.py

Copy file name to clipboardExpand all lines: llama_cpp/llama_chat_format.py
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1848,6 +1848,9 @@ def __init__(self, clip_model_path: str, verbose: bool = False):
18481848
self.verbose = verbose
18491849
self._clip_free = self._llava_cpp._libllava.clip_free # type: ignore
18501850

1851+
if not os.path.exists(clip_model_path):
1852+
raise ValueError(f"Clip model path does not exist: {clip_model_path}")
1853+
18511854
with suppress_stdout_stderr(disable=self.verbose):
18521855
self.clip_ctx = self._llava_cpp.clip_model_load(
18531856
self.clip_model_path.encode(), 0

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.