diff --git a/gpt4all-chat/modellist.cpp b/gpt4all-chat/modellist.cpp index 76916b115c6e..e8139948f9e2 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);