fix loading processor after save_pretrained with transformers 4.49+

#60

save_pretrained additionally save chat_template.json file and trying to load it into processor, but there is no field for this argument.
As the result we got
File "~/python3.11/site-packages/transformers/processing_utils.py", line 868, in from_args_and_dict
processor = cls(*args, **processor_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Phi4MMProcessor.init() got an unexpected keyword argument 'chat_template'

the same issue also visible in phi-3-vision and phi-3.5-vision

Ready to merge
This branch is ready to get merged automatically.
Your need to confirm your account before you can post a new comment.

Sign up or log in to comment