Skip to content

Commit e366626

Browse files
authored
arg : removed unecesary mmproj download when users pass --no-mmproj (#23425)
1 parent 63e66fd commit e366626

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

common/arg.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,6 @@ static handle_model_result common_params_handle_model(struct common_params_model
353353
model.path = "";
354354
}
355355
common_download_opts hf_opts = opts;
356-
hf_opts.download_mmproj = true; // also look for mmproj when downloading hf model
357356
auto download_result = common_download_model(model, hf_opts);
358357

359358
if (download_result.model_path.empty()) {
@@ -441,10 +440,11 @@ bool common_params_handle_models(common_params & params, llama_example curr_ex)
441440
COMMON_SPECULATIVE_TYPE_DRAFT_MTP) != params.speculative.types.end();
442441

443442
common_download_opts opts;
444-
opts.bearer_token = params.hf_token;
445-
opts.offline = params.offline;
446-
opts.skip_download = params.skip_download;
447-
opts.download_mtp = spec_type_draft_mtp;
443+
opts.bearer_token = params.hf_token;
444+
opts.offline = params.offline;
445+
opts.skip_download = params.skip_download;
446+
opts.download_mtp = spec_type_draft_mtp;
447+
opts.download_mmproj = !params.no_mmproj;
448448

449449
try {
450450
auto res = common_params_handle_model(params.model, opts);

0 commit comments

Comments
 (0)