microsoft / microsoft/OmniParser

No such file or directory: 'weights/icon_caption_florence/configuration_florence2.py'

Open
#54 3 comments 1 reaction 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

When I run the model, the error shows that 'No such file or directory: 'weights/icon_caption_florence/configuration_florence2.py''. I checked the model downloaded from HF, and it does not contain the file 'configuration_florence2.py'.
Image

However, I found that the file 'configuration_florence2.py' is a sub-file of 'microsoft/Florence-2-base'. I changed the code below, using 'microsoft/Florence-2-base' instead of model_name_or_path, and the project was able to run successfully.
Code: model = AutoModelForCausalLM.from_pretrained(model_name_or_path, torch_dtype=torch.float16, trust_remote_code=True).to(device)

The test result is unexpected; common icons cannot be recognized.
I look forward to your answer. Thank you.

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 the model loading call using AutoModelForCausalLM.from_pretrained and compare model_name_or_path with microsoft/Florence-2-base. Inspect the downloaded weights/icon_caption_florence contents and the referenced configuration_florence2.py path; done means the project loads the intended model without the missing-file error and icon recognition behaves as expected.

Written by the indexing model from the issue text.

Assessment

Tech stack
huggingface, python, pytorch
Domain
computer-vision, machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.