From 3bcbcc656577c87e4971948b579eeca8023bd32c Mon Sep 17 00:00:00 2001 From: Frank Liu Date: Thu, 30 May 2024 14:35:33 -0700 Subject: [PATCH] [serving] Fixes onnx model conversion bug --- wlm/src/main/java/ai/djl/serving/wlm/LmiUtils.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wlm/src/main/java/ai/djl/serving/wlm/LmiUtils.java b/wlm/src/main/java/ai/djl/serving/wlm/LmiUtils.java index 7a5544896..05ab789cc 100644 --- a/wlm/src/main/java/ai/djl/serving/wlm/LmiUtils.java +++ b/wlm/src/main/java/ai/djl/serving/wlm/LmiUtils.java @@ -137,7 +137,8 @@ static void convertTrtLLM(ModelInfo info) throws IOException { static void convertOnnxModel(ModelInfo info) throws IOException { String prefix = info.prop.getProperty("option.modelName", info.modelDir.toFile().getName()); - if (Files.isRegularFile(info.modelDir.resolve(prefix + ".onnx")) + if (Files.isRegularFile(info.modelDir) + || Files.isRegularFile(info.modelDir.resolve(prefix + ".onnx")) || Files.isRegularFile(info.modelDir.resolve("model.onnx"))) { return; }