diffusers icon indicating copy to clipboard operation
diffusers copied to clipboard

Update Stable Cascade Conversion Scripts

Open DN6 opened this issue 1 year ago • 3 comments

What does this PR do?

  1. Adds the conversion script for Stable Cascade Lite
  2. Updates the conversion script for Stable Cascade to support the variant argument

Fixes # (issue)

Before submitting

  • [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • [ ] Did you read the contributor guideline?
  • [ ] 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.

DN6 avatar Mar 11 '24 03:03 DN6

Also is it not possible to repurpose the existing cascade conversion script to account for the lite variant? Based on discussion here: https://huggingface.slack.com/archives/C065E480NN9/p1709892168966619?thread_ts=1709890560.672549&cid=C065E480NN9

DN6 avatar Mar 11 '24 13:03 DN6

I think the doc entry for the lite variant is pending?

sayakpaul avatar Mar 11 '24 14:03 sayakpaul

@DN6 let's add the docs and ship this!

sayakpaul avatar Mar 12 '24 15:03 sayakpaul

@DN6 will merge https://github.com/huggingface/diffusers/pull/7274 after the CI is done with. Could you leverage the functionalities from that PR to refactor this PR a bit i.e., move the state dict munging functions to single_file_utils.py, make single-file support for Lite is working, etc.?

sayakpaul avatar Mar 13 '24 02:03 sayakpaul

Could you leverage the functionalities from that PR to refactor this PR a bit i.e., move the state dict munging functions to single_file_utils.py, make single-file support for Lite is working, etc.?

Done. Also added a few flags to make the scripts for flexible (skipping stages, optionally creating combined pipeline, changing save folder names etc)

DN6 avatar Mar 13 '24 05:03 DN6

Feel free to merge once https://github.com/huggingface/diffusers/pull/7271#discussion_r1522580386 is addressed.

sayakpaul avatar Mar 13 '24 06:03 sayakpaul