Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to overcome issues of launching demo of MiniGPT-Med project? #6

Open
Shada-Almarghalnai opened this issue Oct 8, 2024 · 0 comments

Comments

@Shada-Almarghalnai
Copy link

Dear Authors,

Thank you for your excellent work and valuable contribution! I'm a master's student and I'm interested in exploring this project. I'm trying to run the MiniGPT-Med project, and I read the ReadMe file and implemented every step. However, whenever I try to launch the demo, multiple errors keep arising...

Kindly, check the codes below:

(miniGPT-Med) D:\Anaconda\MiniGPT-Med>python demo_v2.py --cfg-path eval_configs/minigptv2_eval.yaml --gpu-id 1
Initializing Chat
Traceback (most recent call last):
  File "D:\Anaconda\envs\miniGPT-Med\lib\site-packages\huggingface_hub\utils\_http.py", line 406, in hf_raise_for_status
    response.raise_for_status()
  File "D:\Anaconda\envs\miniGPT-Med\lib\site-packages\requests\models.py", line 1024, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://huggingface.co/None/resolve/main/tokenizer_config.json

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "D:\Anaconda\envs\miniGPT-Med\lib\site-packages\transformers\utils\hub.py", line 403, in cached_file
    resolved_file = hf_hub_download(
  File "D:\Anaconda\envs\miniGPT-Med\lib\site-packages\huggingface_hub\utils\_deprecation.py", line 101, in inner_f
    return f(*args, **kwargs)
  File "D:\Anaconda\envs\miniGPT-Med\lib\site-packages\huggingface_hub\utils\_validators.py", line 114, in _inner_fn
    return fn(*args, **kwargs)
  File "D:\Anaconda\envs\miniGPT-Med\lib\site-packages\huggingface_hub\file_download.py", line 1232, in hf_hub_download
    return _hf_hub_download_to_cache_dir(
  File "D:\Anaconda\envs\miniGPT-Med\lib\site-packages\huggingface_hub\file_download.py", line 1339, in _hf_hub_download_to_cache_dir
    _raise_on_head_call_error(head_call_error, force_download, local_files_only)
  File "D:\Anaconda\envs\miniGPT-Med\lib\site-packages\huggingface_hub\file_download.py", line 1854, in _raise_on_head_call_error
    raise head_call_error
  File "D:\Anaconda\envs\miniGPT-Med\lib\site-packages\huggingface_hub\file_download.py", line 1746, in _get_metadata_or_catch_error
    metadata = get_hf_file_metadata(
  File "D:\Anaconda\envs\miniGPT-Med\lib\site-packages\huggingface_hub\utils\_validators.py", line 114, in _inner_fn
    return fn(*args, **kwargs)
  File "D:\Anaconda\envs\miniGPT-Med\lib\site-packages\huggingface_hub\file_download.py", line 1666, in get_hf_file_metadata
    r = _request_wrapper(
  File "D:\Anaconda\envs\miniGPT-Med\lib\site-packages\huggingface_hub\file_download.py", line 364, in _request_wrapper
    response = _request_wrapper(
  File "D:\Anaconda\envs\miniGPT-Med\lib\site-packages\huggingface_hub\file_download.py", line 388, in _request_wrapper
    hf_raise_for_status(response)
  File "D:\Anaconda\envs\miniGPT-Med\lib\site-packages\huggingface_hub\utils\_http.py", line 454, in hf_raise_for_status
    raise _format(RepositoryNotFoundError, message, response) from e
huggingface_hub.errors.RepositoryNotFoundError: 401 Client Error. (Request ID: Root=1-6703e69a-3d0139137f44daa47c858d7c;d5fa18fb-ae39-4692-9f35-381145e386e7)

Repository Not Found for url: https://huggingface.co/None/resolve/main/tokenizer_config.json.
Please make sure you specified the correct `repo_id` and `repo_type`.
If you are trying to access a private or gated repo, make sure you are authenticated.
Invalid username or password.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "D:\Anaconda\MiniGPT-Med\demo_v2.py", line 63, in <module>
    model = model_cls.from_config(model_config).to(device)
  File "D:\Anaconda\MiniGPT-Med\minigpt4\models\minigpt_v2.py", line 114, in from_config
    model = cls(
  File "D:\Anaconda\MiniGPT-Med\minigpt4\models\minigpt_v2.py", line 46, in __init__
    super().__init__(
  File "D:\Anaconda\MiniGPT-Med\minigpt4\models\minigpt_base.py", line 41, in __init__
    self.llama_model, self.llama_tokenizer = self.init_llm(
  File "D:\Anaconda\MiniGPT-Med\minigpt4\models\base_model.py", line 174, in init_llm
    llama_tokenizer = LlamaTokenizer.from_pretrained(llama_model_path, use_fast=False)
  File "D:\Anaconda\envs\miniGPT-Med\lib\site-packages\transformers\tokenization_utils_base.py", line 2127, in from_pretrained
    resolved_config_file = cached_file(
  File "D:\Anaconda\envs\miniGPT-Med\lib\site-packages\transformers\utils\hub.py", line 426, in cached_file
    raise EnvironmentError(
OSError: None is not a local folder and is not a valid model identifier listed on 'https://huggingface.co/models'
If this is a private repository, make sure to pass a token having permission to this repo either by logging in with `huggingface-cli login` or by passing `token=<your_token>`

(miniGPT-Med) D:\Anaconda\MiniGPT-Med>

I await your response eagerly as it will greatly assist in resolving my issue.
Sincerely,
Shada Almarghalani

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant