We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7712263 commit 3757328Copy full SHA for 3757328
llama_cpp/llama_chat_format.py
@@ -2615,6 +2615,11 @@ def embed_image_bytes(image_bytes: bytes):
2615
if self._last_image_embed is not None and self._last_image_hash is not None and hash(image_bytes) == self._last_image_hash:
2616
return self._last_image_embed
2617
with suppress_stdout_stderr(disable=self.verbose):
2618
+ # Free the previous image embed
2619
+ if self._last_image_embed is not None:
2620
+ self._llava_cpp.llava_image_embed_free(self._last_image_embed)
2621
+ self._last_image_embed = None
2622
+ self._last_image_hash = None
2623
embed = (
2624
self._llava_cpp.llava_image_embed_make_with_bytes(
2625
self.clip_ctx,
0 commit comments