mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2024-10-01 01:06:10 -04:00
chatllm: fix model loading progress showing "Reload" sometimes (#2337)
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
This commit is contained in:
parent
9f9d8e636f
commit
7f1c3d4275
@ -350,6 +350,7 @@ bool ChatLLM::loadModel(const ModelInfo &modelInfo)
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_llModelInfo.model->setProgressCallback([this](float progress) -> bool {
|
m_llModelInfo.model->setProgressCallback([this](float progress) -> bool {
|
||||||
|
progress = std::max(progress, std::numeric_limits<float>::min()); // keep progress above zero
|
||||||
emit modelLoadingPercentageChanged(progress);
|
emit modelLoadingPercentageChanged(progress);
|
||||||
return m_shouldBeLoaded;
|
return m_shouldBeLoaded;
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user