diff --git a/web-app/src/containers/ModelSetting.tsx b/web-app/src/containers/ModelSetting.tsx index fcb61048d..bcbd3dbd8 100644 --- a/web-app/src/containers/ModelSetting.tsx +++ b/web-app/src/containers/ModelSetting.tsx @@ -46,15 +46,20 @@ export function ModelSetting({ } setIsPlanning(true) try { - // Read the model config to get the actual model path + // Read the model config to get the actual model path and mmproj path const modelConfig = await serviceHub.app().readYaml<{ model_path: string + mmproj_path?: string }>(`llamacpp/models/${model.id}/model.yml`) if (modelConfig && modelConfig.model_path) { const result = await serviceHub .models() - .planModelLoad(modelConfig.model_path) + .planModelLoad( + modelConfig.model_path, + undefined, + modelConfig.mmproj_path + ) // Apply the recommended settings to the model sequentially to avoid race conditions const settingsToUpdate: Array<{ diff --git a/web-app/src/services/models/types.ts b/web-app/src/services/models/types.ts index 920cbfe81..d889e41ba 100644 --- a/web-app/src/services/models/types.ts +++ b/web-app/src/services/models/types.ts @@ -136,5 +136,9 @@ export interface ModelsService { ctxSize?: number ): Promise<'RED' | 'YELLOW' | 'GREEN' | 'GREY'> validateGgufFile(filePath: string): Promise - planModelLoad(modelPath: string, requestedCtx?: number): Promise + planModelLoad( + modelPath: string, + requestedCtx?: number, + mmprojPath?: string + ): Promise }