yukiarimo / yuna-ai

Your Private Companion. The future AGI takeover starts here!
https://www.yuna-ai.live/
GNU Affero General Public License v3.0
90 stars 11 forks source link

GIT LFS not installed #73

Closed Joly0 closed 3 months ago

Joly0 commented 3 months ago

Describe the bug A clear and concise description of what the bug is.

abc@434bd6044c34:~/yuna-ai$ python3 index.py
Traceback (most recent call last):
  File "/config/.local/lib/python3.10/site-packages/transformers/modeling_utils.py", line 519, in load_state_dict
    return torch.load(checkpoint_file, map_location=map_location)
  File "/config/.local/lib/python3.10/site-packages/torch/serialization.py", line 1028, in load
    return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
  File "/config/.local/lib/python3.10/site-packages/torch/serialization.py", line 1246, in _legacy_load
    magic_number = pickle_module.load(f, **pickle_load_args)
_pickle.UnpicklingError: invalid load key, 'v'.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/yuna-ai/index.py", line 5, in <module>
    from lib.router import handle_history_request, handle_image_request, handle_message_request, handle_audio_request, services
  File "/config/yuna-ai/lib/router.py", line 6, in <module>
    from lib.vision import capture_image, create_image
  File "/config/yuna-ai/lib/vision.py", line 15, in <module>
    model = BlipForConditionalGeneration.from_pretrained(f"{agi_model_dir}yuna-vision")
  File "/config/.local/lib/python3.10/site-packages/transformers/modeling_utils.py", line 3393, in from_pretrained
    state_dict = load_state_dict(resolved_archive_file)
  File "/config/.local/lib/python3.10/site-packages/transformers/modeling_utils.py", line 524, in load_state_dict
    raise OSError(
OSError: You seem to have cloned a repository without having git-lfs installed. Please install git-lfs and run `git lfs install` followed by `git lfs pull` in the folder you cloned.

To Reproduce Steps to reproduce the behavior:

  1. Installed python3.11 in ubuntu
  2. clone git repo
  3. ran "sh index.sh" and installed all models
  4. ran "python3 index.py" and see error

Expected behavior yuna-ai works

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

yukiarimo commented 3 months ago

Explanation:

Potential solution:

  1. Install GIT LFS by this guide: https://docs.github.com/en/repositories/working-with-files/managing-large-files/installing-git-large-file-storage?platform=linux
  2. If it works, please close the issue
  3. You don't need to install all models for the minimum boot-up
  4. Occasionally, please do git pull for updates!
gitmanbloggus commented 3 months ago

make sure to install it, its needed for vision to work properly

yukiarimo commented 3 months ago

I’ll close it. Seems just a newbie issue.

Joly0 commented 3 months ago

If git-lfs is required, then maybe add that as a requirement in the requirements section in the readme. And dont call it a "newbie issue" if your documentation is not mentioning it. Also i installed git-lfs prior to this, but it seems like i have to clone the whole repo again to make it work.

So i cloned the repo without git-lfs installed, run the first time setup, noticed the git-lfs issue but with another issue aswell and installed git-lfs. Then the other issue was gone and i had the issue i posted above

Joly0 commented 3 months ago

And just another thing:

abc@434bd6044c34:~/yuna-ai$ python index.py 
Traceback (most recent call last):
  File "/config/yuna-ai/index.py", line 172, in <module>
    yuna_server = YunaServer()
  File "/config/yuna-ai/index.py", line 33, in __init__
    self.chat_generator = ChatGenerator(self.config)
  File "/config/yuna-ai/lib/generate.py", line 11, in __init__
    self.model = Llama(
  File "/config/.local/lib/python3.10/site-packages/llama_cpp/llama.py", line 309, in __init__
    raise ValueError(f"Model path does not exist: {model_path}")
ValueError: Model path does not exist: lib/models/yuna/yuna-ai-q5.gguf

There is no file yuna-ai-q5.gguf. There is only a file yuna-ggml-q5.gguf. I think you are missing a rename somewhere or something.

Joly0 commented 3 months ago

And 2 other notes for the readme. First, the discord link isnt working. Second i installed yuna-ai now and i am seeing this now image but what can i do here? Doesnt look like there is anything i can do now.

yukiarimo commented 3 months ago

So, this is what I call a landing page.

  1. You need to click on the "login" or manually go to the /yuna
  2. Please use the index.sh script to install the needed files, as said in the documentation
  3. I probably should update the docs fOr mOrE dEtAiLed nOn-Dev ExPlaNaTioN
yukiarimo commented 3 months ago

The discord link isn't working.

In the docs?

gitmanbloggus commented 3 months ago

yeah discord link doesn't work, it's using your account

gitmanbloggus commented 3 months ago

And just another thing:

abc@434bd6044c34:~/yuna-ai$ python index.py 
Traceback (most recent call last):
  File "/config/yuna-ai/index.py", line 172, in <module>
    yuna_server = YunaServer()
  File "/config/yuna-ai/index.py", line 33, in __init__
    self.chat_generator = ChatGenerator(self.config)
  File "/config/yuna-ai/lib/generate.py", line 11, in __init__
    self.model = Llama(
  File "/config/.local/lib/python3.10/site-packages/llama_cpp/llama.py", line 309, in __init__
    raise ValueError(f"Model path does not exist: {model_path}")
ValueError: Model path does not exist: lib/models/yuna/yuna-ai-q5.gguf

There is no file yuna-ai-q5.gguf. There is only a file yuna-ggml-q5.gguf. I think you are missing a rename somewhere or something.

that's a misnaming, I had to fix it too

yukiarimo commented 3 months ago

Discord link doesn't work; it's using your account

Yes, it's correct. You should DM me first ;)

yukiarimo commented 3 months ago

ValueError: Model path does not exist: lib/models/yuna/yuna-ai-q5.gguf

Shit. It's an ancient issue. I think I should refactor a little my HF repos

yukiarimo commented 3 months ago

I had to fix it, too.

Also, please switch to the dev branch for now. I'll merge it with a new release/hot-fix tomorrow into the main branch!

yukiarimo commented 3 months ago

Also, should we convert this issue to discussion?

gitmanbloggus commented 3 months ago

sure why not