Skip to content

Conversation

@jazcollins
Copy link
Contributor

Previously when we applied caption dropout (via caption_drop_prob in the dataloader), those dropped captions (i.e. empty strings) would end up getting tokenized into padding tokens and encoded by the text encoder(s). This PR adds the option to instead encode the dropped captions as an all zeros tensor by setting zero_dropped_caption=True. Currently this flag is set such that zero-ing out dropped captions will become the new default behavior for both SD2 and SDXL training.

Copy link
Collaborator

@coryMosaicML coryMosaicML left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Copy link
Contributor

@Landanjs Landanjs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@jazcollins jazcollins merged commit 767db4f into mosaicml:main Oct 13, 2023
@jazcollins jazcollins deleted the zero-dropped-captions branch October 13, 2023 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants