File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2892,13 +2892,16 @@ 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 :
2898- raise ValueError ("Vision is not supported by this model" )
2899+ raise ValueError (f"{ self .log_prefix } (_init_mtmd_context): Vision is not supported by this model" )
2900+
28992901 # Check if audio is supported
2900- if self ._mtmd_cpp .mtmd_support_audio (self .mtmd_ctx ) and self .verbose :
2901- print (f"{ self .log_prefix } (_init_mtmd_context): Audio support detected." , file = sys .stderr )
2902+ if self ._mtmd_cpp .mtmd_support_audio (self .mtmd_ctx ):
2903+ if self .verbose :
2904+ print (f"{ self .log_prefix } (_init_mtmd_context): Audio support detected." , file = sys .stderr )
29022905
29032906 def close (self ) -> None :
29042907 """Explicitly free the mtmd context and vision model resources."""
You can’t perform that action at this time.
0 commit comments