(self, clip_model_path: str, verbose: bool = True)
| 2774 | ) |
| 2775 | |
| 2776 | def __init__(self, clip_model_path: str, verbose: bool = True): |
| 2777 | import llama_cpp.mtmd_cpp as mtmd_cpp |
| 2778 | |
| 2779 | self.clip_model_path = clip_model_path |
| 2780 | self.verbose = verbose |
| 2781 | self._mtmd_cpp = mtmd_cpp |
| 2782 | self._exit_stack = ExitStack() |
| 2783 | self.mtmd_ctx: Optional[mtmd_cpp.mtmd_context_p] = None |
| 2784 | |
| 2785 | if not os.path.exists(clip_model_path): |
| 2786 | raise ValueError(f"Clip model path does not exist: {clip_model_path}") |
| 2787 | |
| 2788 | def _init_mtmd_context(self, llama_model: llama.Llama): |
| 2789 | """Initialize mtmd context with the llama model.""" |
nothing calls this directly
no outgoing calls
no test coverage detected