Skip to content

Commit

Permalink
Update src/transformers/models/vitpose/convert_vitpose_to_hf.py
Browse files Browse the repository at this point in the history
Co-authored-by: Pavel Iakubovskii <[email protected]>
  • Loading branch information
SangbumChoi and qubvel authored Nov 20, 2024
1 parent d8e6e2e commit e588f4f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/transformers/models/vitpose/convert_vitpose_to_hf.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,10 @@ def write_model(model_path, model_name, push_to_hub):
raise ValueError("Model not supported")
print("Conversion successfully done.")

# save the model to a local directory
model.save_pretrained(model_path)
image_processor.save_pretrained(model_path)

if push_to_hub:
print(f"Pushing model and image processor for {model_name} to hub")
model.push_to_hub(f"danelcsb/{model_name}")
Expand Down

0 comments on commit e588f4f

Please sign in to comment.