Update gpt4all-chat/modellist.cpp

Co-authored-by: Jared Van Bortel <jared@nomic.ai>
Signed-off-by: AT <manyoso@users.noreply.github.com>
This commit is contained in:
AT 2024-02-26 11:11:38 -05:00
parent f720261d46
commit 7a23b23728

View File

@ -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);