From 8c14e434ec2fa7bd3a21784a0e6f444b32368f66 Mon Sep 17 00:00:00 2001 From: James Date: Fri, 25 Oct 2024 16:02:14 +0700 Subject: [PATCH] fix: crash while downloading model --- engine/services/model_service.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/services/model_service.cc b/engine/services/model_service.cc index 050dbaa4d..7966fd890 100644 --- a/engine/services/model_service.cc +++ b/engine/services/model_service.cc @@ -11,7 +11,6 @@ #include "utils/engine_constants.h" #include "utils/file_manager_utils.h" #include "utils/huggingface_utils.h" -#include "utils/json_helper.h" #include "utils/logging_utils.h" #include "utils/result.hpp" #include "utils/string_utils.h" @@ -382,7 +381,8 @@ ModelService::DownloadModelFromCortexsoAsync( if (model_entry.has_value()) { return cpp::fail("Please delete the model before downloading again"); } - auto on_finished = [&, unique_model_id](const DownloadTask& finishedTask) { + auto on_finished = [branch, + unique_model_id](const DownloadTask& finishedTask) { const DownloadItem* model_yml_item = nullptr; auto need_parse_gguf = true;