Skip to content

Commit c429774

Browse files
committed
prevent errors when loading models without 'alphas_cumprod'
1 parent 66be6e2 commit c429774

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

model.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1418,6 +1418,10 @@ bool ModelLoader::load_tensors(std::map<std::string, struct ggml_tensor*>& tenso
14181418
continue;
14191419
}
14201420

1421+
if (pair.first.find("alphas_cumprod") != std::string::npos) {
1422+
continue;
1423+
}
1424+
14211425
if (tensor_names_in_file.find(pair.first) == tensor_names_in_file.end()) {
14221426
LOG_ERROR("tensor '%s' not in model file", pair.first.c_str());
14231427
some_tensor_not_init = true;

0 commit comments

Comments
 (0)