From 8f66017ccf22a2a0e18df6812909249338a7a15c Mon Sep 17 00:00:00 2001 From: DefTruth <31974251+DefTruth@users.noreply.github.com> Date: Wed, 4 Sep 2024 16:13:35 +0800 Subject: [PATCH] [Bugfix] Fix OrtCompatiableGetInputName errors (#435) * Update utils.cmake * Update vae.h * Update test_lite_sd_pipeline.cpp * Update ort_config.h --- lite/ort/core/ort_config.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lite/ort/core/ort_config.h b/lite/ort/core/ort_config.h index b9f5401f..3450ba08 100644 --- a/lite/ort/core/ort_config.h +++ b/lite/ort/core/ort_config.h @@ -17,7 +17,7 @@ inline static std::string OrtCompatiableGetInputName(size_t index, OrtAllocator* #if ORT_API_VERSION >= 14 return std::string(ort_session->GetInputNameAllocated(index, allocator).get()); #else - return std::string(ort_session->GetInputName(i, allocator)); + return std::string(ort_session->GetInputName(index, allocator)); #endif } @@ -26,7 +26,7 @@ inline static std::string OrtCompatiableGetOutputName(size_t index, OrtAllocator #if ORT_API_VERSION >= 14 return std::string(ort_session->GetOutputNameAllocated(index, allocator).get()); #else - return std::string(ort_session->GetOutputName(i, allocator)); + return std::string(ort_session->GetOutputName(index, allocator)); #endif }