load directly from downloaded state

This commit is contained in:
Ruben Ortlam
2026-04-21 13:22:50 +02:00
parent 884901f04d
commit da1f16886f

View File

@@ -764,7 +764,6 @@ void server_models::load(const std::string & name) {
}
mem = meta.dmm_req;
}
update_status(name, SERVER_MODEL_STATUS_UNLOADED, 0);
try {
_load(name, mem);
} catch (const std::exception & e) {
@@ -800,7 +799,7 @@ void server_models::_load(const std::string & name, const device_memory_map & dm
std::lock_guard<std::mutex> lk(mutex);
auto meta = mapping[name].meta;
if (meta.status != SERVER_MODEL_STATUS_UNLOADED) {
if (meta.status != SERVER_MODEL_STATUS_UNLOADED && meta.status != SERVER_MODEL_STATUS_DOWNLOADING) {
SRV_INF("model %s is not ready\n", name.c_str());
return;
}