fix(llama.cpp/mmproj): fix loading mmproj in nested sub-dirs different from model path (#7832)

fix(mmproj): fix loading mmproj in nested sub-dirs

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
Ettore Di Giacinto
2026-01-02 20:17:30 +01:00
committed by GitHub
parent 1639fc6309
commit 5f6c941399
2 changed files with 10 additions and 7 deletions

View File

@@ -358,9 +358,7 @@ static void params_parse(server_context& /*ctx_server*/, const backend::ModelOpt
params.model.path = request->modelfile();
if (!request->mmproj().empty()) {
// get the directory of modelfile
std::string model_dir = params.model.path.substr(0, params.model.path.find_last_of("/\\"));
params.mmproj.path = model_dir + "/"+ request->mmproj();
params.mmproj.path = request->mmproj();
}
// params.model_alias ??
params.model_alias = request->modelfile();