Merge pull request #616 from jmorganca/mxyng/fix-model-name
This commit is contained in:
commit
e6b3648bbf
1 changed files with 2 additions and 6 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue