fix
This commit is contained in:
parent
ed4cabfe35
commit
ff2ba1533a
@ -15,11 +15,11 @@ from sconf import Config
|
|||||||
|
|
||||||
def main(config):
|
def main(config):
|
||||||
|
|
||||||
max_length = 768
|
# max_length = 768
|
||||||
image_size = [1920, 2560]
|
# image_size = [1920, 2560]
|
||||||
config_vision = VisionEncoderDecoderConfig.from_pretrained(config.pretrained_model_path)
|
# config_vision = VisionEncoderDecoderConfig.from_pretrained(config.pretrained_model_path)
|
||||||
config_vision.encoder.image_size = image_size # (height, width)
|
# config_vision.encoder.image_size = image_size # (height, width)
|
||||||
config_vision.decoder.max_length = max_length
|
# config_vision.decoder.max_length = max_length
|
||||||
|
|
||||||
processor = DonutProcessor.from_pretrained(config.pretrained_processor_path)
|
processor = DonutProcessor.from_pretrained(config.pretrained_processor_path)
|
||||||
model = VisionEncoderDecoderModel.from_pretrained(config.pretrained_model_path, config=config)
|
model = VisionEncoderDecoderModel.from_pretrained(config.pretrained_model_path, config=config)
|
||||||
|
Loading…
Reference in New Issue
Block a user