Added README

* Also allows no --image argument cli to the qwen2vl-cli
This commit is contained in:
sami 2025-02-04 12:13:57 +07:00
parent 5598f475be
commit 23bce61a2f
2 changed files with 72 additions and 1 deletions

View file

@ -524,7 +524,7 @@ int main(int argc, char ** argv) {
common_init();
if (params.mmproj.empty() || (params.image.empty() && !prompt_contains_image(params.prompt))) {
if (params.mmproj.empty()) {
print_usage(argc, argv);
return 1;
}
@ -547,6 +547,15 @@ int main(int argc, char ** argv) {
llava_image_embed_free(image_embed);
ctx_llava->model = NULL;
llava_free(ctx_llava);
} else if (params.image.empty()) {
auto ctx_llava = llava_init_context(&params, model);
// process the prompt
process_prompt(ctx_llava, nullptr, &params, params.prompt);
llama_perf_context_print(ctx_llava->ctx_llama);
ctx_llava->model = NULL;
llava_free(ctx_llava);
#ifndef NDEBUG
} else if (params.image[0].empty()) {
auto ctx_llava = llava_init_context(&params, model);