mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-10-23 00:50:47 +00:00
Fix crash with chatgpt and gpu layers.
Signed-off-by: Adam Treat <treat.adam@gmail.com>
This commit is contained in:
@@ -135,6 +135,7 @@ void ModelInfo::setGpuLayers(int l)
|
||||
|
||||
int ModelInfo::maxGpuLayers() const
|
||||
{
|
||||
if (isOnline) return -1;
|
||||
if (m_maxGpuLayers != -1) return m_maxGpuLayers;
|
||||
auto path = (dirpath + filename()).toStdString();
|
||||
int layers = LLModel::Implementation::layerCount(path);
|
||||
|
Reference in New Issue
Block a user