From 7a23b23728c4473b36b490f2f2abe8d5529afb56 Mon Sep 17 00:00:00 2001 From: AT Date: Mon, 26 Feb 2024 11:11:38 -0500 Subject: [PATCH] Update gpt4all-chat/modellist.cpp Co-authored-by: Jared Van Bortel Signed-off-by: AT --- gpt4all-chat/modellist.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gpt4all-chat/modellist.cpp b/gpt4all-chat/modellist.cpp index 76916b11..e8139948 100644 --- a/gpt4all-chat/modellist.cpp +++ b/gpt4all-chat/modellist.cpp @@ -146,8 +146,7 @@ void ModelInfo::setGpuLayers(int l) int ModelInfo::maxGpuLayers() const { - if (!installed) return -1; - if (isOnline) return -1; + if (!installed || isOnline) return -1; if (m_maxGpuLayers != -1) return m_maxGpuLayers; auto path = (dirpath + filename()).toStdString(); int layers = LLModel::Implementation::layerCount(path);