{"record":{"id":"bacf3a17c067a759","repo":"SubtitleEdit/subtitleedit","slug":"llama-cpp-vision-projector-not-found-please-down","errorCode":null,"errorMessage":"llama.cpp vision projector not found - please download the model first.","messagePattern":"llama\\.cpp vision projector not found - please download the model first\\.","errorType":"exception","errorClass":"FileNotFoundException","httpStatus":null,"severity":"error","filePath":"src/libuilogic/LlamaCpp/LlamaCppServerManager.cs","lineNumber":515,"sourceCode":"\n            var exe = GetExecutable();\n            if (!File.Exists(exe))\n            {\n                throw new FileNotFoundException(\"llama-server executable not found - please download llama.cpp first.\", exe);\n            }\n\n            if (!File.Exists(modelPath))\n            {\n                throw new FileNotFoundException(\"llama.cpp model not found - please download a model first.\", modelPath);\n            }\n\n            string? mmprojPath = null;\n            if (model.MmprojFileName != null)\n            {\n                mmprojPath = GetModelPath(model.MmprojFileName);\n                if (!File.Exists(mmprojPath))\n                {\n                    throw new FileNotFoundException(\"llama.cpp vision projector not found - please download the model first.\", mmprojPath);\n                }\n            }\n\n            var port = FindFreeLoopbackPort();\n            var psi = new ProcessStartInfo\n            {\n                WorkingDirectory = Path.GetDirectoryName(exe) ?? GetAndCreateFolder(),\n                FileName = exe,\n                UseShellExecute = false,\n                CreateNoWindow = true,\n                RedirectStandardError = true,\n                RedirectStandardOutput = true,\n            };\n            psi.ArgumentList.Add(\"-m\");\n            psi.ArgumentList.Add(modelPath);\n            if (mmprojPath != null)\n            {\n                psi.ArgumentList.Add(\"--mmproj\");","sourceCodeStart":497,"sourceCodeEnd":533,"githubUrl":"https://github.com/SubtitleEdit/subtitleedit/blob/17a9f0748781032255db3526b7215d2fb891e3af/src/libuilogic/LlamaCpp/LlamaCppServerManager.cs#L497-L533","documentation":"Thrown when a multimodal model declares MmprojFileName but the resolved mmproj file (the vision projector, typically mmproj-*.gguf) is absent on disk. Reaching here means the text model file passed its check; only the optional vision projector is missing.","triggerScenarios":"A LlamaCppModel with non-null MmprojFileName where GetModelPath(model.MmprojFileName) returns a path that does not exist; user downloaded the LLM weights but not the matching mmproj sidecar.","commonSituations":"Pulling a multimodal model (e.g. Llama 3.2 Vision, Qwen2-VL) and forgetting the mmproj.gguf; the projector ships as a separate file on HuggingFace and was skipped.","solutions":["Download the matching mmproj-*.gguf from the same HuggingFace repo as the model and place it in the same Models folder.","If you do not need vision OCR, set MmprojFileName to null for this model so the projector check is skipped.","Confirm the exact mmproj filename matches what GetModelPath expects (case-sensitive on Linux)."],"exampleFix":"// before\nif (!File.Exists(mmprojPath))\n    throw new FileNotFoundException(\"llama.cpp vision projector not found - please download the model first.\", mmprojPath);\n\n// after\nif (model.MmprojFileName != null)\n{\n    mmprojPath = GetModelPath(model.MmprojFileName);\n    if (!File.Exists(mmprojPath))\n        LogAction?.Invoke($\"Vision projector missing at {mmprojPath}; vision OCR disabled.\");\n}","handlingStrategy":"validation","validationCode":"if (model.MmprojFileName != null)\n{\n    var mmproj = GetModelPath(model.MmprojFileName);\n    if (!File.Exists(mmproj))\n        return Result.Fail($\"Vision projector '{mmproj}' missing; vision OCR will be unavailable.\");\n}","typeGuard":"null","tryCatchPattern":"null","preventionTips":["When registering a multimodal model, require both the .gguf and the mmproj-*.gguf at config time.","Make the mmproj optional and degrade gracefully (text-only) instead of throwing if vision OCR is not needed."],"tags":["llama-cpp","file-not-found","vision","multimodal"],"backgroundTag":null,"analyzedSha":"17a9f0748781032255db3526b7215d2fb891e3af","analyzedAt":"2026-08-13T18:11:43.374Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}