diff --git a/server/images.go b/server/images.go index f0a55d3b..e16f4bb4 100644 --- a/server/images.go +++ b/server/images.go @@ -918,7 +918,8 @@ func ShowModelfile(model *Model) (string, error) { mt.From = model.ModelPath if model.OriginalModel != "" { - mt.From = ParseModelPath(model.OriginalModel).GetShortTagname() + mp := ParseModelPath(model.OriginalModel) + mt.From = mp.GetShortTagname() } modelFile := `# Modelfile generated by "ollama show"