Skip to content

Conversation

@pcuenca
Copy link
Member

@pcuenca pcuenca commented Dec 30, 2022

Fixes #1864

@pcuenca pcuenca requested a review from patil-suraj December 30, 2022 11:15
@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Dec 30, 2022

The documentation is not available anymore as the PR was closed or merged.

Copy link
Contributor

@patil-suraj patil-suraj 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, just left one nit. Thanks a lot, @jorgemcgomes for spotting the bug!

self.decay = self.get_decay(self.optimization_step)

# Compute the decay factor for the exponential moving average.
current_decay = (1 + self.optimization_step) / (10 + self.optimization_step)
Copy link
Contributor

@patil-suraj patil-suraj Dec 30, 2022

Choose a reason for hiding this comment

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

(nit) this is not the current decay, current decay is

min(decay, (1 + self.optimization_step) / (10 + self.optimization_step))

Copy link
Member Author

Choose a reason for hiding this comment

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

You are right! I didn't like value because it doesn't mean anything, but will go back to it because can't think of anything better right now.

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.

EMA model in Stable Diffusion training example is wrong

4 participants