feat: add support for mmproj offload setting
Expose the new `mmproj_offload` option in the model settings UI and include it in the `ModelPlan` type. The component now collects the offload flag (`result.offloadMmproj`) and queues it with other setting updates to ensure a single atomic change, preventing race conditions when toggling this feature. This enables users to control MMProj offloading directly from the app.
This commit is contained in:
parent
14c7fc0450
commit
8f67f29317
@ -93,6 +93,16 @@ export function ModelSetting({
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
model.settings?.mmproj_offload &&
|
||||||
|
result.offloadMmproj !== undefined
|
||||||
|
) {
|
||||||
|
settingsToUpdate.push({
|
||||||
|
key: 'mmproj_offload',
|
||||||
|
value: result.offloadMmproj,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// Apply all settings in a single update to avoid race conditions
|
// Apply all settings in a single update to avoid race conditions
|
||||||
if (settingsToUpdate.length > 0) {
|
if (settingsToUpdate.length > 0) {
|
||||||
handleMultipleSettingsChange(settingsToUpdate)
|
handleMultipleSettingsChange(settingsToUpdate)
|
||||||
|
|||||||
@ -85,6 +85,7 @@ export interface ModelPlan {
|
|||||||
gpuLayers: number
|
gpuLayers: number
|
||||||
maxContextLength: number
|
maxContextLength: number
|
||||||
noOffloadKVCache: boolean
|
noOffloadKVCache: boolean
|
||||||
|
offloadMmproj: boolean
|
||||||
mode: 'GPU' | 'Hybrid' | 'CPU' | 'Unsupported'
|
mode: 'GPU' | 'Hybrid' | 'CPU' | 'Unsupported'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user