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

fix min-snr implementation #8466

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

ethansmith2000
Copy link
Contributor

What does this PR do?

Fixes the implementation of min-snr training for v-prediction models

Based on implementation seen here.
https://github.com/kohya-ss/sd-scripts/blob/main/library/custom_train_functions.py#L66

These two graphs show the weight scheme based on timestep from the kohya implementation.
epssnr
v-predsnr

the current implementation in diffusers takes the eps weight and increases everything by + 1, it appears that the +1 should be relocated to the denominator

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.

Thanks for the fix!

Do you want to apply it to the other scripts too?

@sayakpaul
Copy link
Member

@ethansmith2000 a gentle ping :)

@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.

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

3 participants