AttributeError: 'MBartOrderConfig' object has no attribute 'max_width'
Pikacheng opened this issue · 0 comments
File "/opt/anaconda3/envs/marker_env/bin/marker_single", line 8, in
sys.exit(main())
File "/opt/anaconda3/envs/marker_env/lib/python3.10/site-packages/convert_single.py", line 32, in main
model_lst = load_all_models()
File "/opt/anaconda3/envs/marker_env/lib/python3.10/site-packages/marker/models.py", line 74, in load_all_models
order = setup_order_model(device, dtype)
File "/opt/anaconda3/envs/marker_env/lib/python3.10/site-packages/marker/models.py", line 61, in setup_order_model
model = load_order_model()
File "/opt/anaconda3/envs/marker_env/lib/python3.10/site-packages/surya/model/ordering/model.py", line 27, in load_model
model = OrderVisionEncoderDecoderModel.from_pretrained(checkpoint, config=config, torch_dtype=dtype)
File "/opt/anaconda3/envs/marker_env/lib/python3.10/site-packages/transformers/models/vision_encoder_decoder/modeling_vision_encoder_decoder.py", line 371, in from_pretrained
return super().from_pretrained(pretrained_model_name_or_path, *model_args, **kwargs)
File "/opt/anaconda3/envs/marker_env/lib/python3.10/site-packages/transformers/modeling_utils.py", line 3832, in from_pretrained
model = cls(config, *model_args, **model_kwargs)
File "/opt/anaconda3/envs/marker_env/lib/python3.10/site-packages/transformers/models/vision_encoder_decoder/modeling_vision_encoder_decoder.py", line 196, in init
decoder = AutoModelForCausalLM.from_config(config.decoder, attn_implementation=config._attn_implementation)
File "/opt/anaconda3/envs/marker_env/lib/python3.10/site-packages/transformers/models/auto/auto_factory.py", line 438, in from_config
return model_class._from_config(config, **kwargs)
File "/opt/anaconda3/envs/marker_env/lib/python3.10/site-packages/transformers/modeling_utils.py", line 1503, in _from_config
model = cls(config, **kwargs)
File "/opt/anaconda3/envs/marker_env/lib/python3.10/site-packages/surya/model/ordering/decoder.py", line 495, in init
self.model = MBartOrderDecoderWrapper(config)
File "/opt/anaconda3/envs/marker_env/lib/python3.10/site-packages/surya/model/ordering/decoder.py", line 480, in init
self.decoder = MBartOrderDecoder(config)
File "/opt/anaconda3/envs/marker_env/lib/python3.10/site-packages/surya/model/ordering/decoder.py", line 284, in init
self.embed_tokens = BboxEmbedding(config) if embed_tokens is None else embed_tokens
File "/opt/anaconda3/envs/marker_env/lib/python3.10/site-packages/surya/model/ordering/decoder.py", line 240, in init
self.x1_embed = nn.Embedding(config.max_width, config.d_model)
File "/opt/anaconda3/envs/marker_env/lib/python3.10/site-packages/transformers/configuration_utils.py", line 264, in getattribute
return super().getattribute(key)
AttributeError: 'MBartOrderConfig' object has no attribute 'max_width'