-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Save base model in ControlNet training scripts when saving trained model or pushing to hub #3115
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
Comments
I think it would make sense to add that to the YAML metadata like we do in the DreamBooth training as well:
|
We could definitely add such a flag to the training script @pcuenca - I'd say be default we only save controlnet, but having an option to save the whole model along-side makes a lot of sense! |
Thanks, @sayakpaul and @patrickvonplaten, I'll prepare a PR then! I thought we just needed the metadata info, didn't think about saving the whole model to the same repo. Actually the metadata field already appears in some models, for example here: https://huggingface.co/lllyasviel/control_v11f1p_sd15_depth/blob/main/README.md?code=true#L3, but couldn't find it being automatically added in either the training or conversion scripts. |
Thank you all! We currently assume a |
Closing as fixed by #3229. |
This came up in the PR to provide ControlNet support to Apple's
ml-stable-diffusion
: apple/ml-stable-diffusion#153. I've also seen people training ControlNet models for Stable Diffusion v2 and v2.1, so it could be useful to save this as a metadata field for users of the trained models.This would be similar to the
base_model
recently added to the textual inversion training script: huggingface/notebooks@944dc4b, but could maybe go inside theconfig.json
of the saved model.@williamberman @sayakpaul @yiyixuxu @patrickvonplaten do you think this could be useful? If so, I can submit a PR for both the PyTorch and the Flax training scripts.
The text was updated successfully, but these errors were encountered: