-
Notifications
You must be signed in to change notification settings - Fork 6.6k
[dreambooth] allow fine-tuning text encoder #883
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
Conversation
|
The documentation is not available anymore as the PR was closed or merged. |
anton-l
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
|
Cool! |
| args.pretrained_model_name_or_path, unet=accelerator.unwrap_model(unet) | ||
| args.pretrained_model_name_or_path, | ||
| unet=accelerator.unwrap_model(unet), | ||
| text_encoder=accelerator.unwrap_model(text_encoder), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not true when not finetuning the text encoder, is it?
| text_encoder=accelerator.unwrap_model(text_encoder), | |
| text_encoder=accelerator.unwrap_model(text_encoder) if args.train_text_encoder else text_encoder, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in that case accelerator.unwrap_model will act as a no op, so it's fine to use it like this.
|
BTW not necessary in this PR, but it'd be very nice if we could update this table here: https://github.com/huggingface/diffusers/tree/main/examples#-diffusers-examples -> it's always nice to see directly all the examples at once. |
|
I guess this isn't compatible with deepspeed and a 8 GB GPU? |
* allow fine-tuning text encoder * fix a few things * update readme
* allow fine-tuning text encoder * fix a few things * update readme
Co-authored-by: @shirayu
Allow fine-tuning text encoder in dreambooth.