Skip to content

Commit 2966639

Browse files
committed
only handle mmproj in llava example
1 parent 583deff commit 2966639

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

common/arg.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -815,8 +815,9 @@ static bool common_params_parse_ex(int argc, char ** argv, common_params_context
815815
common_params_handle_model(params.speculative.model, params.hf_token, "");
816816
common_params_handle_model(params.vocoder.model, params.hf_token, "");
817817

818-
// mmproj is always in the same repo with text model
819-
if (!params.model.hf_repo.empty()) {
818+
// allow --mmproj to be set from -hf
819+
// assuming that mmproj is always in the same repo as text model
820+
if (!params.model.hf_repo.empty() && ctx_arg.ex == LLAMA_EXAMPLE_LLAVA) {
820821
params.mmproj.hf_repo = params.model.hf_repo;
821822
}
822823
common_params_handle_model(params.mmproj, params.hf_token, "", true);

0 commit comments

Comments
 (0)