Models page doesn't list anything
LocalAI version: LocalAI Version v2.15.0 (f69de3be0d274a676f1d1cd302dc4699f1b5aaf0) I am running Unraid, using the Cuda 11 docker of LocalAI
Describe the bug Click "Models" tab. Nothing is listed. It's worked before, so I know what it should look like. See: logs.
Expected behavior A list of models is shown
Logs
4:49PM INF Success ip=10.0.0.172 latency=28.218659ms method=GET status=200 url=/
4:49PM INF Success ip=10.0.0.172 latency="25.955µs" method=GET status=200 url=/static/general.css
4:49PM DBG YAML errors: line 1: cannot unmarshal !!map into []*gallery.GalleryModel
wreckage of models: []
4:49PM INF Success ip=10.0.0.172 latency=178.998323ms method=GET status=200 url=/browse/
Additional context Clearly, something is wrong with the parsing of a YAML file around the models page, preventing it from listing the models. Unfortunately I dont know where to dig for further info .
Additional info:
GALLERIES is set to
[{"name":"localai", "url":"github:mudler/localai/gallery/index.yaml"},{"name":"skynet", "url":"github:go-skynet/model-gallery/index.yaml"}]
docker execution looks like
docker run
-d
--name='LocalAI'
--net='bridge'
-e TZ="America/Los_Angeles"
-e HOST_OS="Unraid"
-e HOST_HOSTNAME="niz"
-e HOST_CONTAINERNAME="LocalAI"
-e 'DEBUG'='true'
-e 'GALLERIES'='[{"name":"localai", "url":"github:mudler/localai/gallery/index.yaml"},{"name":"skynet", "url":"github:go-skynet/model-gallery/index.yaml"}]'
-l net.unraid.docker.managed=dockerman
-l net.unraid.docker.webui='http://[IP]:[PORT:8080]/'
-l net.unraid.docker.icon='https://github.com/go-skynet/LocalAI/assets/2420543/0966aa2a-166e-4f99-a3e5-6c915fc997dd?raw=1'
-p '8080:8080/tcp'
-v '/mnt/user/appdata/local_ai/models':'/build/models':'rw'
--gpus=all 'localai/localai:latest-aio-gpu-nvidia-cuda-12'
5d49007cf02f0b8548e037867c6e3ee38a50f3dfb162b7ec2f6750e3cc819273
I got it to work. I removed the default gallery from the GALLERIES string and just used the go-skynet one. So uh, the index.yaml of the default mudler gallery isn't parsing correctly. I noticed the files look different. the top of the mudler one looks like
---
### START parler-tts
- &parler-tts
url: "github:mudler/LocalAI/gallery/parler-tts.yaml@master"
name: parler-tts-mini-v0.1
with that triple dash thing. I don't know enough about yaml to know if that's legit or not. Maybe you guys were updating the format of the index.yaml file and your changes aren't in sync with the parser or something?
@greaterthanstar all works here - what if you unset GALLERIES and let default take over?
- I completely removed the GALLERIES variable and ... it worked. showing your repo
- I added back GALLERIES with the value
[{"name":"localai", "url":"github:mudler/localai/gallery/index.yaml"},{"name":"skynet", "url":"github:go-skynet/model-gallery/index.yaml"}]and it failed again. (note that it does say "showing 2 repositories" at the top) - I stripped out the mudler repo and it worked, showing 1 repo (skynet)
Hi sorry to bump this but I think I made a similar boo-boo trying to set up a custom gallery...
- GALLERIES=[{"name":"bunder2015", "url":"github:bunder2015/localai-gallery/index.yaml"}]
https://raw.githubusercontent.com/bunder2015/localai-gallery/refs/heads/master/index.yaml https://raw.githubusercontent.com/bunder2015/localai-gallery/refs/heads/master/flux.yaml (same as the localai one)
The models page says 0 models from 1 repository, and I get the same cannot unmarshal !!map into []*gallery.GalleryModel error.
Any idea where I borked it? Thanks