From c429774fe9ca33a826ca92d0e55c0eed7262a7f3 Mon Sep 17 00:00:00 2001 From: leejet Date: Mon, 1 Jan 2024 16:17:33 +0800 Subject: [PATCH] prevent errors when loading models without 'alphas_cumprod' --- model.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/model.cpp b/model.cpp index 4741f68..5c9af2b 100644 --- a/model.cpp +++ b/model.cpp @@ -1418,6 +1418,10 @@ bool ModelLoader::load_tensors(std::map& tenso continue; } + if (pair.first.find("alphas_cumprod") != std::string::npos) { + continue; + } + if (tensor_names_in_file.find(pair.first) == tensor_names_in_file.end()) { LOG_ERROR("tensor '%s' not in model file", pair.first.c_str()); some_tensor_not_init = true;