fix: Check for existence of clip model path (#1264)
This commit is contained in:
parent
2811014bae
commit
1f3156d4f2
1 changed files with 3 additions and 0 deletions
|
@ -1848,6 +1848,9 @@ class Llava15ChatHandler:
|
|||
self.verbose = verbose
|
||||
self._clip_free = self._llava_cpp._libllava.clip_free # type: ignore
|
||||
|
||||
if not os.path.exists(clip_model_path):
|
||||
raise ValueError(f"Clip model path does not exist: {clip_model_path}")
|
||||
|
||||
with suppress_stdout_stderr(disable=self.verbose):
|
||||
self.clip_ctx = self._llava_cpp.clip_model_load(
|
||||
self.clip_model_path.encode(), 0
|
||||
|
|
Loading…
Reference in a new issue