Skip to content

Conversation

@bghira
Copy link
Owner

@bghira bghira commented Feb 1, 2026

Closes #2542

This pull request enhances the save_model_card function in simpletuner/helpers/publishing/metadata.py to better handle video assets and improve the generation of model cards. The changes ensure that video files are recognized, their URLs are correctly linked (especially when pushing to the Hugging Face Hub), and the gallery introduction dynamically reflects the presence of videos.

Asset handling improvements:

  • Added detection of video assets (specifically .mp4 files) when saving metadata samples, and set a has_video flag accordingly.
  • When generating output URLs for assets, now uses the full Hugging Face Hub URL for videos if push_to_hub is enabled and a repo_id is provided; otherwise, uses a local path.

Model card content improvements:

  • The gallery introduction in the model card now dynamically mentions videos if any are present, providing clearer information to users viewing the card. [1] [2]

@bghira bghira merged commit 916688d into main Feb 1, 2026
2 checks passed
@bghira bghira deleted the feature/2542 branch February 1, 2026 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

use <video> tag in huggingface model card

2 participants