Skip to content

Commit 167106f

Browse files
committed
fix: Correct the mtmd vision check condition bug
1 parent 8b29b88 commit 167106f

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

llama_cpp/llama_chat_format.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2892,8 +2892,9 @@ def _init_mtmd_context(self, llama_model: llama.Llama):
28922892
raise ValueError(f"{self.log_prefix}(_init_mtmd_context): Failed to load mtmd context from: {self.clip_model_path}")
28932893

28942894
# Check if vision is supported
2895-
if self._mtmd_cpp.mtmd_support_vision(self.mtmd_ctx) and self.verbose:
2896-
print(f"{self.log_prefix}(_init_mtmd_context): Vision support detected.", file=sys.stderr)
2895+
if self._mtmd_cpp.mtmd_support_vision(self.mtmd_ctx):
2896+
if self.verbose:
2897+
print(f"{self.log_prefix}(_init_mtmd_context): Vision support detected.", file=sys.stderr)
28972898
else:
28982899
raise ValueError("Vision is not supported by this model")
28992900
# Check if audio is supported

0 commit comments

Comments
 (0)