Skip to content
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

SD3: update default training timestep / loss weighting distribution to logit_normal #8592

Merged
merged 2 commits into from
Jun 18, 2024

Conversation

bghira
Copy link
Contributor

@bghira bghira commented Jun 16, 2024

What does this PR do?

Though it's not as obvious when training on small batch sizes, it's really obvious at large batch sizes that the timestep distribution is not correct.

When reflecting upon the SD3 paper, I saw that they use rf/lognorm(0,1) as their ideal weighting formulation.

It doesn't really do much to save the model or make it any more easily trainable, unfortunately. But, it keeps it from collapsing. Might seem like that contradicts what I just said, but people who have tried training SD 2.0 will know what I mean.

Before submitting

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

Copy link
Member

@sayakpaul sayakpaul left a comment

Choose a reason for hiding this comment

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

@kashif
Copy link
Contributor

kashif commented Jun 17, 2024

yeah. looks good to me!

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@Slickytail
Copy link
Contributor

Yep, I agree. This should absolutely be the default setting, since it's the one that SD3 was trained with.

@sayakpaul sayakpaul merged commit 074a7cc into huggingface:main Jun 18, 2024
6 of 8 checks passed
@sayakpaul
Copy link
Member

Failing tests are unrelated.

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.

None yet

5 participants