Coder Social home page Coder Social logo

run demo.py error about minigpt-4 HOT 2 CLOSED

vision-cair avatar vision-cair commented on August 21, 2024
run demo.py error

from minigpt-4.

Comments (2)

TsuTikgiau avatar TsuTikgiau commented on August 21, 2024

Thanks for your interest! It looks like you don't set the path of the Vicuna weight, as I see path placeholder '/path/to/vicuna/weights' in your error message. Please refer to "2. Prepare the pretrained Vicuna weights" in the instruction section of readme for the setting details. Thanks!

from minigpt-4.

wahab4321 avatar wahab4321 commented on August 21, 2024

Hi dear it gives me below error can anyone guide:PS C:\Users\OSAID'$ laptop'$\Desktop\minigpt4> & "C:/Program Files/Python310/python.exe" "c:/Users/OSAID'$ laptop'$/Desktop/minigpt4/app.py"
Initializing Chat
Loading VIT
Loading VIT Done
Loading Q-Former
Loading Q-Former Done
Loading LLAMA
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ c:\Users\OSAID'$ laptop'$\Desktop\minigpt4\app.py:64 in │
│ │
│ 61 │
│ 62 model_config = cfg.model_cfg │
│ 63 model_cls = registry.get_model_class(model_config.arch) │
│ ❱ 64 model = model_cls.from_config(model_config).to('cuda:0') │
│ 65 │
│ 66 vis_processor_cfg = cfg.datasets_cfg.cc_align.vis_processor.train │
│ 67 vis_processor = registry.get_processor_class(vis_processor_cfg.name).from_config(vis_pro │
│ │
│ c:\Users\OSAID'$ laptop'$\Desktop\minigpt4\minigpt4\models\mini_gpt4.py:239 in from_config │
│ │
│ 236 │ │ max_txt_len = cfg.get("max_txt_len", 32) │
│ 237 │ │ end_sym = cfg.get("end_sym", '\n') │
│ 238 │ │ │
│ ❱ 239 │ │ model = cls( │
│ 240 │ │ │ vit_model=vit_model, │
│ 241 │ │ │ q_former_model=q_former_model, │
│ 242 │ │ │ img_size=img_size, │
│ │
│ c:\Users\OSAID'$ laptop'$\Desktop\minigpt4\minigpt4\models\mini_gpt4.py:90 in init
│ │
│ 87 │ │ print('Loading Q-Former Done') │
│ 88 │ │ │
│ 89 │ │ print('Loading LLAMA') │
│ ❱ 90 │ │ self.llama_tokenizer = LlamaTokenizer.from_pretrained('Vision-CAIR/vicuna', use_ │
│ 91 │ │ self.llama_tokenizer.pad_token = self.llama_tokenizer.eos_token │
│ 92 │ │ │
│ 93 │ │ if llama_cache_dir: │
│ │
│ C:\Program Files\Python310\lib\os.py:679 in getitem
│ │
│ 676 │ │ │ value = self._data[self.encodekey(key)] │
│ 677 │ │ except KeyError: │
│ 678 │ │ │ # raise KeyError with the original key value │
│ ❱ 679 │ │ │ raise KeyError(key) from None │
│ 680 │ │ return self.decodevalue(value) │
│ 681 │ │
│ 682 │ def setitem(self, key, value): │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
KeyError: 'API_TOKEN'
PS C:\Users\OSAID'$ laptop'$\Desktop\minigpt4>

from minigpt-4.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.