Closed darwinharianto closed 1 year ago
Hi @darwinharianto
Thank you for opening the issue.
Could you specify which code sample in the link is the exact one that has problem to run? Thank a lot!
@darwinharianto Thanks for reporting this! It seems the issue is coming from the preprocessor config files on the hub for this checkpoint: it points to a class which doesn't exist. If I clone and modify the config file, the image processor will load correctly.
I'll also add this modeling file to our doctests.
System Info
transformers
version: 4.31.0.dev0Who can help?
No response
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
run sample code from MobileViTV2ForImageClassification
throws an error
ValueError: Unrecognized image processor in apple/mobilevitv2-1.0-imagenet1k-256. Should have a
image_processor_type
key in its preprocessor_config.json of config.json, or one of the followingmodel_type
keys in its config.json: align, beit, bit, blip, blip-2, bridgetower, chinese_clip, clip, clipseg, conditional_detr, convnext, convnextv2, cvt, data2vec-vision, deformable_detr, deit, deta, detr, dinat, donut-swin, dpt, efficientformer, efficientnet, flava, focalnet, git, glpn, groupvit, imagegpt, instructblip, layoutlmv2, layoutlmv3, levit, mask2former, maskformer, mgp-str, mobilenet_v1, mobilenet_v2, mobilevit, mobilevitv2, nat, oneformer, owlvit, perceiver, pix2struct, poolformer, regnet, resnet, sam, segformer, swiftformer, swin, swin2sr, swinv2, table-transformer, timesformer, tvlt, upernet, van, videomae, vilt, vit, vit_hybrid, vit_mae, vit_msn, xclip, yolosExpected behavior
sample code should not throw an error