-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Allow selecting precision to make Dreambooth class images #1832
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
patil-suraj
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.
Thanks a lot for the PR! I'm not in favor of this because IMO it's fine to just use fp16 for generating images here. If mixed-precision is not used for training, then the generation will happen in fp32 which will make it twice slower and require more memory. Generating images in fp16 doesn't really hurt the quality of the images. Hope this makes sense :)
Also, is there any specific reason for doing inference in fp32?
|
@patil-suraj Using fp16 for generating images may not work for every hardware, like in my case. It's specified in the settings anyway, so if your gpu is fine with it, just leave it on fp16 as it is by default |
|
I see, in this maybe we can could add a new argument, |
|
@patil-suraj sounds good, I can remake this PR then for this new argument. I did think of adding a new argument in the first place, yet decided against it in presence of another, but not entirely related argument. If adding a new one is fine, it will be even better |
|
Yeah adding a new one is fine, go for it. |
|
named it prior_generation_precision instead of prior_generation_dtype to be similar with the existing mixed_precision argument, the options are also "no", "fp32", "fp16", "bp16" to reflect the choices for that option |
patil-suraj
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.
Looks good!
|
The documentation is not available anymore as the PR was closed or merged. |
Co-authored-by: Suraj Patil <[email protected]>
Now the precision type for Dreambooth class images generation can be set with
mixed_precisionas well.Fixes #1831