Skip to content

Commit 397348c

Browse files
committed
handle no_mmproj explicitly
1 parent aa88f32 commit 397348c

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

common/arg.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -842,8 +842,10 @@ static bool common_params_parse_ex(int argc, char ** argv, common_params_context
842842
// handle model and download
843843
{
844844
auto res = common_params_handle_model(params.model, params.hf_token, DEFAULT_MODEL_PATH);
845-
// optionally, handle mmproj model when -hf is specified
846-
if (res.found_mmproj && params.mmproj.path.empty() && params.mmproj.url.empty()) {
845+
if (params.no_mmproj) {
846+
params.mmproj = {};
847+
} else if (res.found_mmproj && params.mmproj.path.empty() && params.mmproj.url.empty()) {
848+
// optionally, handle mmproj model when -hf is specified
847849
params.mmproj = res.mmproj;
848850
}
849851
common_params_handle_model(params.mmproj, params.hf_token, "");

examples/llava/mtmd-cli.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ int main(int argc, char ** argv) {
249249

250250
if (params.mmproj.path.empty()) {
251251
show_additional_info(argc, argv);
252+
LOG_ERR("ERR: Missing --mmproj argument\n");
252253
return 1;
253254
}
254255

0 commit comments

Comments
 (0)