server: fix load-on-startup not respected in ini file (#19897)

Co-authored-by: Roman Marchenko <r.marchenko@ideco.ru>
This commit is contained in:
drrros 2026-02-26 14:32:31 +03:00 committed by GitHub
parent 9b62913b40
commit efba35a860
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -291,7 +291,9 @@ void server_models::load_models() {
for (const auto & [name, inst] : mapping) {
std::string val;
if (inst.meta.preset.get_option(COMMON_ARG_PRESET_LOAD_ON_STARTUP, val)) {
models_to_load.push_back(name);
if (common_arg_utils::is_truthy(val)) {
models_to_load.push_back(name);
}
}
}
if ((int)models_to_load.size() > base_params.models_max) {