From 9646f1aac452956d854e5173cee4a26ff95f7eb1 Mon Sep 17 00:00:00 2001 From: Megvii Engine Team Date: Wed, 8 Dec 2021 12:09:08 +0800 Subject: [PATCH] fix(lite/load_and_run): fix invalid model type caused by oss model magic change GitOrigin-RevId: 1d071f999e70111fb6f63a5b8f333ccd9b498161 --- lite/load_and_run/src/models/model.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lite/load_and_run/src/models/model.cpp b/lite/load_and_run/src/models/model.cpp index 22d85d290..85b7ab179 100644 --- a/lite/load_and_run/src/models/model.cpp +++ b/lite/load_and_run/src/models/model.cpp @@ -24,12 +24,12 @@ ModelType ModelBase::get_model_type(std::string model_path) { fclose(fin); // get model type - // uint32_t MGB_MAGIC = 0x5342474D std::string tag(buf); ModelType type; if (tag.substr(0, 7) == std::string("mgb0001") || tag.substr(0, 8) == std::string("mgb0000a") || tag.substr(0, 4) == std::string("MGBS") || + tag.substr(0, 4) == std::string("MGBC") || tag.substr(0, 8) == std::string("mgbtest0")) { type = ModelType::MEGDL_MODEL; -- GitLab