LAVIS icon indicating copy to clipboard operation
LAVIS copied to clipboard

error with blip_classification, model_type = 'base'

Open ColinConwell opened this issue 2 years ago • 0 comments

Thank you LAVIS team for this wonderful repo!

It appears that loading blip_classification with model_type='base' throws an error stemming from the configuration files. Is this expected behavior? If so, perhaps a more descriptive error (or solution) could be provided with the assertion?

device = torch.device("cuda" if torch.cuda.is_available() else "cpu")

from lavis.models import load_model_and_preprocess
model, processors, _ = load_model_and_preprocess(name="blip_classification", 
                                                 model_type="base", 
                                                 is_eval=True, device=device)

AssertionError: Invalid number of classes provided, found -1

ColinConwell avatar Dec 05 '22 05:12 ColinConwell