Skip to content

Commit

Permalink
receive review comments and modify
Browse files Browse the repository at this point in the history
  • Loading branch information
tc-mb committed May 31, 2024
1 parent 88f5e6a commit a913ca4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/minicpmv/minicpmv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ static bool bicubic_resize(const clip_image_u8 &img, clip_image_u8 &dst, int tar
}
}
}

return true;
}

Expand Down
2 changes: 1 addition & 1 deletion examples/minicpmv/minicpmv_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ void process_image(struct minicpmv_context * ctx_llava, std::vector<std::vector<

system_prompt = "<|begin_of_text|><|start_header_id|>user<|end_header_id|>\n\n";
LOG_TEE("%s: image token past: %d\n", __func__, n_past);
eval_string(ctx_llava->ctx_llama, (system_prompt+"<image>").c_str(), params->n_batch, &n_past, true);
eval_string(ctx_llava->ctx_llama, (system_prompt+"<image>").c_str(), params->n_batch, &n_past, false);
llava_eval_image_embed(ctx_llava->ctx_llama, image_embed_slices[0][0], params->n_batch, &n_past);
eval_string(ctx_llava->ctx_llama, std::string("</image>").c_str(), params->n_batch, &n_past, false);
if (image_embed_slices.size() > 1) {
Expand Down
1 change: 1 addition & 0 deletions examples/minicpmv/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
-r ../../requirements/requirements-convert.txt
pillow~=10.2.0
torch~=2.1.1
torchvision==0.16.2

0 comments on commit a913ca4

Please sign in to comment.