mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-09-20 01:31:42 +02:00
gemma4uv alloc fix
This commit is contained in:
+2
-2
@@ -5145,8 +5145,8 @@ bool clip_is_llava(const struct clip_ctx * ctx) {
|
||||
return ctx->model.hparams.has_llava_projector;
|
||||
}
|
||||
|
||||
bool clip_is_gemma4(const struct clip_ctx * ctx) { //for kcpp use
|
||||
return ctx->proj_type() == PROJECTOR_TYPE_GEMMA4V;
|
||||
bool clip_is_gemma4v(const struct clip_ctx * ctx) { //for kcpp use
|
||||
return (ctx->proj_type() == PROJECTOR_TYPE_GEMMA4V || ctx->proj_type() == PROJECTOR_TYPE_GEMMA4UV);
|
||||
}
|
||||
|
||||
bool clip_has_vision_encoder(const struct clip_ctx * ctx) {
|
||||
|
||||
+1
-1
@@ -115,7 +115,7 @@ bool clip_image_batch_encode(struct clip_ctx * ctx, int n_threads, const struct
|
||||
|
||||
int clip_is_minicpmv(const struct clip_ctx * ctx);
|
||||
bool clip_is_glm(const struct clip_ctx * ctx);
|
||||
bool clip_is_gemma4(const struct clip_ctx * ctx);
|
||||
bool clip_is_gemma4v(const struct clip_ctx * ctx);
|
||||
bool clip_is_llava(const struct clip_ctx * ctx);
|
||||
void set_clip_uses_gpu(bool usegpu);
|
||||
int clip_get_projector_type_ext(clip_ctx * ctx);
|
||||
|
||||
@@ -79,7 +79,7 @@ bool llava_image_embed_make_with_clip_img(clip_ctx * ctx_clip, int n_threads, co
|
||||
}
|
||||
image_embd = (float *)malloc(clip_embd_nbytes_by_img(ctx_clip, max_nx, max_ny));
|
||||
}
|
||||
else if(clip_is_gemma4(ctx_clip)) //gemma4 vision
|
||||
else if(clip_is_gemma4v(ctx_clip)) //gemma4 vision
|
||||
{
|
||||
const size_t n_imgs = clip_image_f32_batch_n_images(preprocessed_img.get());
|
||||
clip_image_f32 * img_res = clip_image_f32_get_img(preprocessed_img.get(), 0);
|
||||
|
||||
Reference in New Issue
Block a user