prevent errors when loading models without 'alphas_cumprod'

This commit is contained in:
leejet 2024-01-01 16:17:33 +08:00
parent 66be6e2e58
commit c429774fe9

View File

@ -1418,6 +1418,10 @@ bool ModelLoader::load_tensors(std::map<std::string, struct ggml_tensor*>& 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;