From 0625e805f09e0ba7ea04448842621ec0e829d725 Mon Sep 17 00:00:00 2001 From: Michael Yang Date: Tue, 26 Sep 2023 19:49:55 -0700 Subject: [PATCH] fix model name not matching --- cmd/cmd.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/cmd/cmd.go b/cmd/cmd.go index 443dc6f5..ee5b753e 100644 --- a/cmd/cmd.go +++ b/cmd/cmd.go @@ -127,13 +127,9 @@ func RunHandler(cmd *cobra.Command, args []string) error { return err } - modelName, modelTag, ok := strings.Cut(args[0], ":") - if !ok { - modelTag = "latest" - } - + canonicalModelPath := server.ParseModelPath(args[0]) for _, model := range models.Models { - if model.Name == strings.Join([]string{modelName, modelTag}, ":") { + if model.Name == canonicalModelPath.GetShortTagname() { return RunGenerate(cmd, args) } }