From 822f2d729c8f72ab6d20dc759a59c135f75bc2fb Mon Sep 17 00:00:00 2001 From: josc146 Date: Sun, 28 May 2023 23:45:11 +0800 Subject: [PATCH] fix: sha256 check for model deduplication --- frontend/src/utils/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/utils/index.tsx b/frontend/src/utils/index.tsx index 4ae0a29..2ed1b08 100644 --- a/frontend/src/utils/index.tsx +++ b/frontend/src/utils/index.tsx @@ -113,7 +113,7 @@ export async function refreshRemoteModels(cache: { models: ModelSourceItem[] }) cache.models = cache.models.filter((model, index, self) => { return model.name.endsWith('.pth') && index === self.findIndex( - m => m.name === model.name || (m.SHA256 === model.SHA256 && m.size === model.size)); + m => m.name === model.name || (m.SHA256 && m.SHA256 === model.SHA256 && m.size === model.size)); }); commonStore.setModelSourceList(cache.models); await saveCache().catch(() => {