From 518a593c2ad16efb41d2ae26680aac57a158f858 Mon Sep 17 00:00:00 2001 From: jialin Date: Thu, 24 Apr 2025 16:10:07 +0800 Subject: [PATCH] fix: gpuoptions empty --- src/pages/llmodels/hooks/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/pages/llmodels/hooks/index.ts b/src/pages/llmodels/hooks/index.ts index 0c06f859..6f9d732e 100644 --- a/src/pages/llmodels/hooks/index.ts +++ b/src/pages/llmodels/hooks/index.ts @@ -230,6 +230,9 @@ export const useGenerateModelFileOptions = () => { // handle for ascend npu only export const checkOnlyAscendNPU = (gpuOptions: any[]) => { + if (!gpuOptions?.length) { + return false; + } return gpuOptions?.every?.((item) => { return item.children?.every((child: any) => { return _.toLower(child.vendor) === 'huawei';