microsoft / microsoft/OmniParser

requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://huggingface.co/weights/icon_caption_florence/resolve/main/config.json

Open
#26 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
25.4k
Forks
2.2k
PR merge metrics
No merged PRs in 30d

Description

Hey guys, I'm trying to run the gradio_demo.py and demo.ipynb locally and it looks like the repository that the demo code relies on is no longer available.

Can you please fix this? Or let me know how to run it?

Thanks.

Error Message:

Repository Not Found for url: https://huggingface.co/weights/icon_caption_florence/resolve/main/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.

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

Traceback (most recent call last):
  File "/Users/matthew/Desktop/omniparser/OmniParser/gradio_demo.py", line 16, in <module>
    caption_model_processor = get_caption_model_processor(model_name="florence2", model_name_or_path="weights/icon_caption_florence")
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/matthew/Desktop/omniparser/OmniParser/utils.py", line 54, in get_caption_model_processor
    model = AutoModelForCausalLM.from_pretrained(model_name_or_path, torch_dtype=torch.float32, trust_remote_code=True)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/matthew/Desktop/omniparser/OmniParser/venv/lib/python3.11/site-packages/transformers/models/auto/auto_factory.py", line 487, in from_pretrained
    resolved_config_file = cached_file(
                           ^^^^^^^^^^^^
  File "/Users/matthew/Desktop/omniparser/OmniParser/venv/lib/python3.11/site-packages/transformers/utils/hub.py", line 426, in cached_file
    raise EnvironmentError(
OSError: weights/icon_caption_florence is not a local folder and is not a valid model identifier listed on 'https://huggingface.co/models'

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with gradio_demo.py and demo.ipynb, then inspect get_caption_model_processor in utils.py where weights/icon_caption_florence is passed to the model loader. Reproduce the 404 and trace how the model path is resolved. Done means both referenced demos can load the caption model without the reported missing-repository error, or clearly document the required run instructions.

Written by the indexing model from the issue text.

Assessment

Tech stack
huggingface, jupyter-notebook, python
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.