mudler / LocalAI

:robot: The free, Open Source OpenAI alternative. Self-hosted, community-driven and local-first. Drop-in replacement for OpenAI running on consumer-grade hardware. No GPU required. Runs gguf, transformers, diffusers and many more models architectures. It allows to generate Text, Audio, Video, Images. Also with voice cloning capabilities.
https://localai.io
MIT License
21.75k stars 1.66k forks source link

Models page doesn't list anything #2320

Open greaterthanstar opened 1 month ago

greaterthanstar commented 1 month ago

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 .

greaterthanstar commented 1 month ago

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
greaterthanstar commented 1 month ago

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?

mudler commented 1 month ago

@greaterthanstar all works here - what if you unset GALLERIES and let default take over?

greaterthanstar commented 1 month ago