mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-06-24 06:27:22 +00:00
Don't persist the force metal setting.
This commit is contained in:
parent
267601d670
commit
42c0a6673a
@ -12,9 +12,6 @@ MySettings *MySettings::globalInstance()
|
||||
MySettings::MySettings()
|
||||
: QObject{nullptr}
|
||||
{
|
||||
QSettings settings;
|
||||
settings.sync();
|
||||
m_forceMetal = settings.value("forceMetal", false).toBool();
|
||||
}
|
||||
|
||||
bool MySettings::forceMetal() const
|
||||
|
@ -52,7 +52,6 @@ Dialog {
|
||||
### Assistant:\n"
|
||||
property string defaultModelPath: ModelList.defaultLocalModelsPath()
|
||||
property string defaultUserDefaultModel: "Application default"
|
||||
property bool defaultForceMetal: false
|
||||
|
||||
property alias temperature: settings.temperature
|
||||
property alias topP: settings.topP
|
||||
@ -68,7 +67,6 @@ Dialog {
|
||||
property alias serverChat: settings.serverChat
|
||||
property alias modelPath: settings.modelPath
|
||||
property alias userDefaultModel: settings.userDefaultModel
|
||||
property alias forceMetal: settings.forceMetal
|
||||
|
||||
Settings {
|
||||
id: settings
|
||||
@ -86,7 +84,6 @@ Dialog {
|
||||
property string promptTemplate: settingsDialog.defaultPromptTemplate
|
||||
property string modelPath: settingsDialog.defaultModelPath
|
||||
property string userDefaultModel: settingsDialog.defaultUserDefaultModel
|
||||
property bool forceMetal: settingsDialog.defaultForceMetal
|
||||
}
|
||||
|
||||
function restoreGenerationDefaults() {
|
||||
@ -113,7 +110,7 @@ Dialog {
|
||||
LLM.serverEnabled = settings.serverChat
|
||||
ChatListModel.shouldSaveChats = settings.saveChats
|
||||
ChatListModel.shouldSaveChatGPTChats = settings.saveChatGPTChats
|
||||
MySettings.forceMetal = settings.forceMetal
|
||||
MySettings.forceMetal = false
|
||||
settings.sync()
|
||||
}
|
||||
|
||||
@ -123,7 +120,6 @@ Dialog {
|
||||
ChatListModel.shouldSaveChats = settings.saveChats
|
||||
ChatListModel.shouldSaveChatGPTChats = settings.saveChatGPTChats
|
||||
ModelList.localModelsPath = settings.modelPath
|
||||
MySettings.forceMetal = settings.forceMetal
|
||||
}
|
||||
|
||||
Connections {
|
||||
@ -817,11 +813,9 @@ Dialog {
|
||||
Layout.columnSpan: 2
|
||||
MyCheckBox {
|
||||
id: gpuOverrideBox
|
||||
checked: settings.forceMetal
|
||||
checked: MySettings.forceMetal
|
||||
onClicked: {
|
||||
settingsDialog.forceMetal = gpuOverrideBox.checked
|
||||
MySettings.forceMetal = gpuOverrideBox.checked
|
||||
settings.sync()
|
||||
MySettings.forceMetal = !MySettings.forceMetal
|
||||
}
|
||||
}
|
||||
Label {
|
||||
@ -830,7 +824,7 @@ Dialog {
|
||||
Layout.alignment: Qt.AlignTop
|
||||
color: theme.textErrorColor
|
||||
wrapMode: Text.WordWrap
|
||||
text: qsTr("WARNING: On macOS with arm architecture (M1+), this setting forces usage of the GPU if it is detected. Can cause a crash if the model requires more RAM than the OS + GPU supports. Setting has no effect on non-macs or intel macs.")
|
||||
text: qsTr("WARNING: On macOS with arm (M1+) this setting forces usage of the GPU. Can cause crashes if the model requires more RAM than the system supports. Because of crash possibilty the setting will not persist across restarts of the application. This has no effect on non-macs or intel.")
|
||||
}
|
||||
}
|
||||
MyButton {
|
||||
|
Loading…
Reference in New Issue
Block a user