Skip to content

Commit

Permalink
Merge pull request #3163 from alibaba/feature/bugfix
Browse files Browse the repository at this point in the history
Converter:Bugfix: Fix bug for static model convert error from not MNN…
  • Loading branch information
jxt1234 authored Jan 13, 2025
2 parents f0454f6 + 4b45d32 commit b500a46
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/converter/source/common/cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,8 @@ bool Cli::convertModel(modelConfig& modelPath) {
}
}
bool needOptimize = modelPath.model != modelConfig::MNN || modelPath.optimizeLevel >= 1;
if (modelPath.saveStaticModel) {
if (modelPath.saveStaticModel && modelPath.model == modelConfig::MNN) {
MNN_PRINT("Skip Optimize for static model\n");
needOptimize = false;
}
std::vector<std::string> expectedPass;
Expand Down

0 comments on commit b500a46

Please sign in to comment.