From 5e7fd6906f4653fa671aa5d2e2d4dd5bdf17fd36 Mon Sep 17 00:00:00 2001 From: Bruce MacDonald Date: Mon, 11 Dec 2023 15:35:31 -0500 Subject: [PATCH] Update images.go --- server/images.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/images.go b/server/images.go index 8e7b3343..006a91d3 100644 --- a/server/images.go +++ b/server/images.go @@ -421,7 +421,11 @@ func CreateModel(ctx context.Context, name, modelFileDir string, commands []pars // if the model is not in gguf format, pull the base model to try and get it in gguf format if fromConfig.ModelFormat != "gguf" { fn(api.ProgressResponse{Status: "updating base model"}) - if err := PullModel(ctx, c.Args, &RegistryOptions{}, fn); err != nil { + parent, err := GetModel(c.Args) + if err != nil { + return err + } + if err := PullModel(ctx, parent.OriginalModel, &RegistryOptions{}, fn); err != nil { log.Printf("error pulling model: %v", err) } // Reset the file pointer to the beginning of the file