Skip to content

Commit 5deaeba

Browse files
committed
fix(gallery): automatically install model from name
Signed-off-by: Ettore Di Giacinto <[email protected]>
1 parent c546774 commit 5deaeba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/backend/llm.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func ModelInference(ctx context.Context, s string, messages []schema.Message, im
4242
if _, err := os.Stat(modelFile); os.IsNotExist(err) {
4343
utils.ResetDownloadTimers()
4444
// if we failed to load the model, we try to download it
45-
err := gallery.InstallModelFromGallery(o.Galleries, o.BackendGalleries, modelFile, loader.ModelPath, o.BackendsPath, gallery.GalleryModel{}, utils.DisplayDownloadFunction, o.EnforcePredownloadScans, o.AutoloadBackendGalleries)
45+
err := gallery.InstallModelFromGallery(o.Galleries, o.BackendGalleries, c.Name, loader.ModelPath, o.BackendsPath, gallery.GalleryModel{}, utils.DisplayDownloadFunction, o.EnforcePredownloadScans, o.AutoloadBackendGalleries)
4646
if err != nil {
4747
log.Error().Err(err).Msgf("failed to install model %q from gallery", modelFile)
4848
//return nil, err

0 commit comments

Comments
 (0)