Skip to content

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

@xiahc

Description

@xiahc

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions