diffusers icon indicating copy to clipboard operation
diffusers copied to clipboard

fix: ignore checkpoint when uploading

Open JeffersonQin opened this issue 1 year ago • 3 comments

What does this PR do?

Fixes # (issue)

Before submitting

  • [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • [x] Did you read the contributor guideline?
  • [x] Did you read our philosophy doc (important for complex PRs)?
  • [ ] Was this discussed/approved via a GitHub issue or the forum? Please add a link to it if that's the case.
  • [ ] Did you make sure to update the documentation with your changes? Here are the documentation guidelines, and here are tips on formatting docstrings.
  • [ ] Did you write any new necessary tests?

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.

JeffersonQin avatar May 22 '24 00:05 JeffersonQin

@bghira (Not sure if I am pinging the right person), could you please take a review on this pr? Thanks.

JeffersonQin avatar May 22 '24 17:05 JeffersonQin

@JeffersonQin thanks for the ping. in my trainer i have resolved this a different way, as the save_pretrained call uses os.path.join(args.output_dir, 'pipeline')

the code for the controlnet sdxl example looks like:

        if args.push_to_hub:
            save_model_card(
                repo_id,
                image_logs=image_logs,
                base_model=args.pretrained_model_name_or_path,
                repo_folder=args.output_dir,
            )
            upload_folder(
                repo_id=repo_id,
                folder_path=args.output_dir,
                commit_message="End of training",
                ignore_patterns=["step_*", "epoch_*"],
            )

if we use folder_path=os.path.join(args.output_dir, 'pipeline'), then we could just upload the pipeline folder and not have to continually expand the list of ignored elements.

it's a large number of examples to update either way, @yiyixuxu do you have a preference for how this is fixed?

bghira avatar May 24 '24 00:05 bghira

@bghira Yeah, I think either way would work. But for your method, you need to update couple of more places, e.g. model card, and make sure if further changes are needed, we should keep them updated to the pipeline path. And thanks for your reply! I am open to discussion and changes.

Anyway, I would suggest this to be quickly fixed, otherwise it would take up a longtime and waste a lot of traffic and bandwidth for users.

JeffersonQin avatar May 25 '24 16:05 JeffersonQin

I will fix it later today. thanks for the feedback!

JeffersonQin avatar May 29 '24 00:05 JeffersonQin

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

github-actions[bot] avatar Sep 14 '24 15:09 github-actions[bot]