diff --git a/LLama/Native/SafeLlamaModelHandle.cs b/LLama/Native/SafeLlamaModelHandle.cs index 31b73dfd4..23c1f7671 100644 --- a/LLama/Native/SafeLlamaModelHandle.cs +++ b/LLama/Native/SafeLlamaModelHandle.cs @@ -121,7 +121,7 @@ public static SafeLlamaModelHandle LoadFromFile(string modelPath, LLamaModelPara throw new InvalidOperationException($"Model file '{modelPath}' is not readable"); return llama_load_model_from_file(modelPath, lparams) - ?? throw new LoadWeightsFailedException($"Failed to load model {modelPath}."); + ?? throw new LoadWeightsFailedException(modelPath); } #region native API diff --git a/LLama/Native/SafeLlavaModelHandle.cs b/LLama/Native/SafeLlavaModelHandle.cs index bd49a5789..f73af27c4 100644 --- a/LLama/Native/SafeLlavaModelHandle.cs +++ b/LLama/Native/SafeLlavaModelHandle.cs @@ -53,7 +53,7 @@ public static SafeLlavaModelHandle LoadFromFile(string modelPath, int verbosity throw new InvalidOperationException($"Llava MMP Model file '{modelPath}' is not readable"); return clip_model_load(modelPath, verbosity) - ?? throw new RuntimeError($"Failed to load LLaVa model {modelPath}."); + ?? throw new LoadWeightsFailedException(modelPath); } ///