add push processor to hub

This commit is contained in:
BUAADreamer 2024-05-09 14:05:19 +08:00
parent fdb3955448
commit 8b997e32fb
1 changed files with 2 additions and 0 deletions

View File

@ -91,3 +91,5 @@ def export_model(args: Optional[Dict[str, Any]] = None) -> None:
if model_args.visual_inputs: if model_args.visual_inputs:
processor.image_processor.save_pretrained(model_args.export_dir) processor.image_processor.save_pretrained(model_args.export_dir)
if model_args.export_hub_model_id is not None:
processor.image_processor.push_to_hub(model_args.export_hub_model_id, token=model_args.hf_hub_token)