[diffusers-cli] Add a CLI command to run FP16 and safetensors conversions and opening PRs#3982
Conversation
|
The documentation is not available anymore as the PR was closed or merged. |
pcuenca
left a comment
There was a problem hiding this comment.
Very nice! My only question is whether this should live in src/diffusers or just moved to scripts with the other utilities.
|
I think it might be better off as a CLI command. |
|
@patrickvonplaten happy to also add a little doc. In that case, where should that be added? @pcuenca could I also get your review? |
I thought about the doc too, but not sure where it should go. Maybe a README somewhere, for now? |
|
Hmm, let me just add an usage example in the command source file itself. I think that should cut it for now. |
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. |
…ions and opening PRs (huggingface#3982) * feat: add a cli util for fp16 and safetensors format. * fix: commit_description. * add: usage example.
…ions and opening PRs (huggingface#3982) * feat: add a cli util for fp16 and safetensors format. * fix: commit_description. * add: usage example.
This PR introduces a CLI command for converting checkpoints to FP16 and safetensors. And it also provides support for opening PR to the corresponding pipeline repo with the converted checkpoints. This PR is very much inspired from @gante's https://github.com/huggingface/transformers/blob/main/src/transformers/commands/pt_to_tf.py.
I tested with:
Resultant PR: https://huggingface.co/sayakpaul/shap_e_testing/discussions/1/
If this is approved I will run the command on SHAP-E repositories of OpenAI and open PRs.
Cc: @yiyixuxu (for Kandinsky 2.2)