fix: incorrect gpu selection that cause performance degrade on CPU only mode

This commit is contained in:
Louis 2024-11-21 14:15:28 +07:00
parent 55ad2f3931
commit b733a8738d
No known key found for this signature in database
GPG Key ID: 44FA9F4D33C37DE2

View File

@ -259,11 +259,11 @@ const updateGpuInfo = async () =>
data.gpu_highest_vram = highestVramId
} else {
data.gpus = []
data.gpu_highest_vram = ''
data.gpu_highest_vram = undefined
}
if (!data.gpus_in_use || data.gpus_in_use.length === 0) {
data.gpus_in_use = [data.gpu_highest_vram]
data.gpus_in_use = data.gpu_highest_vram ? [data.gpu_highest_vram].filter(e => !!e) : []
}
data = await updateCudaExistence(data)