From fccab82f5e6f07d3f881e0a049e2b80653eec162 Mon Sep 17 00:00:00 2001 From: John <78893154+cmp-nct@users.noreply.github.com> Date: Wed, 24 Jan 2024 01:43:00 +0100 Subject: [PATCH] Update clip.cpp bugfix for new conversions --- examples/llava/clip.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/llava/clip.cpp b/examples/llava/clip.cpp index 47079e06a..3774dcc07 100644 --- a/examples/llava/clip.cpp +++ b/examples/llava/clip.cpp @@ -846,10 +846,11 @@ struct clip_ctx * clip_model_load(const char * fname, const int verbosity = 1) { new_clip->proj_type = clip_projector_type_from_string(proj_type); } else { + new_clip->proj_type = PROJECTOR_TYPE_MLP; + } + if (new_clip->proj_type == PROJECTOR_TYPE_MLP) { if (gguf_find_tensor(ctx, format(TN_LLAVA_PROJ, 3, "weight").c_str()) != -1) { new_clip->proj_type = PROJECTOR_TYPE_MLP_NORM; - } else { - new_clip->proj_type = PROJECTOR_TYPE_MLP; } } }