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

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

Open
xiahc opened this issue Oct 29, 2024 · 2 comments

Comments

@xiahc
Copy link

xiahc commented Oct 29, 2024

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.

@dushwe
Copy link

dushwe commented Oct 30, 2024

copy configuration_florence2.py from microsoft/Florence-2-base-ft ,

modify config.json

Image
👇

Image

@abrichr
Copy link

abrichr commented Oct 30, 2024

See download.py for automated download (and #52 for automated deployment).

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

3 participants