Skip to content

Commit 8014d2c

Browse files
authored
server: Don't consider models with --no-mmproj-auto as multimodal (ggml-org#25590)
If mmproj is explicitly disabled via the model preset or command-line parameters then the model won't be able to handle image/audio inputs and this shouldn't be declared as supported input modality on the /v1/models endpoint.
1 parent 4114ba1 commit 8014d2c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tools/server/server-models.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,13 +219,14 @@ void server_model_meta::update_caps() {
219219
"LLAMA_ARG_MODEL_URL",
220220
"LLAMA_ARG_MMPROJ",
221221
"LLAMA_ARG_MMPROJ_URL",
222+
"LLAMA_ARG_MMPROJ_AUTO",
222223
"LLAMA_ARG_HF_REPO",
223224
"LLAMA_ARG_HF_REPO_FILE",
224225
});
225226
params.offline = true;
226227
common_models_handler handler = common_models_handler_init(params, LLAMA_EXAMPLE_SERVER);
227228
common_models_handler_apply(handler, params); // note: this won't download the model because offline=true
228-
if (params.mmproj.path.empty()) {
229+
if (params.no_mmproj || params.mmproj.path.empty()) {
229230
multimodal = { false, false };
230231
} else {
231232
multimodal = mtmd_get_cap_from_file(params.mmproj.path.c_str());

0 commit comments

Comments
 (0)