Skip to content

[bugfix] Fix the issue that will save the model card if push to hub is not applied in HiDream #11629

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

leisuzz
Copy link
Contributor

@leisuzz leisuzz commented May 29, 2025

What does this PR do?

The PR fixed the issue that save_model_card is automatically processed if push_to_hub is not called.
Now the function save_model_card is placed the same spot like other models

Before submitting

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@leisuzz
Copy link
Contributor Author

leisuzz commented May 29, 2025

@sayakpaul Please take look at this PR, thank you for your help :)

@linoytsaban
Copy link
Collaborator

Hi @leisuzz! this was actually done on purpose so that even if the model is not pushed to the hub, a model card is saved locally with an automatically generated inference snippet for easy usage.
did it error for you when --push_to_hub is not enabled?

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@leisuzz
Copy link
Contributor Author

leisuzz commented May 29, 2025

Hi @linoytsaban, I'm facing the error with the save_model_card function. I think to provide the flexible way to select save model_card and push_to_hub is better.

@leisuzz
Copy link
Contributor Author

leisuzz commented May 29, 2025

Hi @linoytsaban, I'm facing the error with the save_model_card function. I think to provide the flexible way to select save model_card and push_to_hub is better.

Because I'm running the model locally, and save_model_card will need external connect to the website. Which will cause error for users that need local training

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.

4 participants