Facing an error while Loading the model

#5
by Akshit01 - opened

ValueError: Unrecognized configuration class <class 'transformers.models.pix2struct.configuration_pix2struct.Pix2StructConfig'> for this kind of AutoModel: AutoModelForSeq2SeqLM.
Model type should be one of BartConfig, BigBirdPegasusConfig, BlenderbotConfig, BlenderbotSmallConfig, EncoderDecoderConfig, FSMTConfig, GPTSanJapaneseConfig, LEDConfig, LongT5Config, M2M100Config, MarianConfig, MBartConfig, MT5Config, MvpConfig, NllbMoeConfig, PegasusConfig, PegasusXConfig, PLBartConfig, ProphetNetConfig, SwitchTransformersConfig, T5Config, UMT5Config, XLMProphetNetConfig.

@Akshit01 You need to use the class Pix2StructForConditionalGeneration (imported with from transformers import Pix2StructForConditionalGeneration). The "Use in transformers" widget is wrong.

Your need to confirm your account before you can post a new comment.

Sign up or log in to comment