summaryrefslogtreecommitdiff
path: root/examples/llava/llava.cpp
diff options
context:
space:
mode:
authorGeorgi Gerganov <ggerganov@gmail.com>2023-12-30 23:24:42 +0200
committerGitHub <noreply@github.com>2023-12-30 23:24:42 +0200
commit9fbda719de18a9400a064c28759c39d55d687d3e (patch)
tree97a341a28bd18ce9619cfb891ccf36a0e8df4a15 /examples/llava/llava.cpp
parent39d8bc71edcb8b6f99d46fa4216af7a15232e218 (diff)
clip : refactor + bug fixes (#4696)
* clip : refactor + bug fixes ggml-ci * server : add log message
Diffstat (limited to 'examples/llava/llava.cpp')
-rw-r--r--examples/llava/llava.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/llava/llava.cpp b/examples/llava/llava.cpp
index 0cae8c4b..d42e7582 100644
--- a/examples/llava/llava.cpp
+++ b/examples/llava/llava.cpp
@@ -10,7 +10,7 @@
#include "base64.hpp"
static bool encode_image_with_clip(clip_ctx * ctx_clip, int n_threads, const clip_image_u8 * img, float * image_embd, int * n_img_pos) {
- clip_image_f32 * img_res = make_clip_image_f32();
+ clip_image_f32 * img_res = clip_image_f32_init();
if (!clip_image_preprocess(ctx_clip, img, img_res, /*pad2square =*/ true)) {
fprintf(stderr, "%s: unable to preprocess image\n", __func__);
clip_image_f32_free(img_res);
@@ -86,7 +86,7 @@ bool llava_eval_image_embed(llama_context * ctx_llama, const struct llava_image_
}
LLAVA_API struct llava_image_embed * llava_image_embed_make_with_bytes(struct clip_ctx * ctx_clip, int n_threads, const unsigned char * image_bytes, int image_bytes_length) {
- clip_image_u8 * img = make_clip_image_u8();
+ clip_image_u8 * img = clip_image_u8_init();
if (!clip_image_load_from_bytes(image_bytes, image_bytes_length, img)) {
clip_image_u8_free(img);
fprintf(stderr, "%s: can't load image from bytes, is it a valid image?", __func__);