mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-08-12 13:21:58 +00:00
Fix state issues with reloading model.
Signed-off-by: Adam Treat <treat.adam@gmail.com>
This commit is contained in:
parent
4fc4d94be4
commit
67bbce43ab
@ -672,7 +672,11 @@ void ChatLLM::unloadModel()
|
|||||||
if (!isModelLoaded() || m_isServer)
|
if (!isModelLoaded() || m_isServer)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
emit modelLoadingPercentageChanged(0.0f);
|
if (!m_forceUnloadModel || !m_shouldBeLoaded)
|
||||||
|
emit modelLoadingPercentageChanged(0.0f);
|
||||||
|
else
|
||||||
|
emit modelLoadingPercentageChanged(std::numeric_limits<float>::min()); // small non-zero positive value
|
||||||
|
|
||||||
saveState();
|
saveState();
|
||||||
#if defined(DEBUG_MODEL_LOADING)
|
#if defined(DEBUG_MODEL_LOADING)
|
||||||
qDebug() << "unloadModel" << m_llmThread.objectName() << m_llModelInfo.model;
|
qDebug() << "unloadModel" << m_llmThread.objectName() << m_llModelInfo.model;
|
||||||
|
@ -463,7 +463,7 @@ Window {
|
|||||||
|
|
||||||
MyMiniButton {
|
MyMiniButton {
|
||||||
id: ejectButton
|
id: ejectButton
|
||||||
visible: currentChat.isModelLoaded
|
visible: currentChat.isModelLoaded && !window.isCurrentlyLoading
|
||||||
z: 500
|
z: 500
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: 50
|
anchors.rightMargin: 50
|
||||||
|
Loading…
Reference in New Issue
Block a user