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

Questions about soft-min-snr loss #98

Open
hmicrobe opened this issue Feb 20, 2024 · 1 comment
Open

Questions about soft-min-snr loss #98

hmicrobe opened this issue Feb 20, 2024 · 1 comment

Comments

@hmicrobe
Copy link

hmicrobe commented Feb 20, 2024

Really nice work! When reading through the paper, I have some questions about the proposed soft-min-snr loss. Would appreciate your feedback on this.

  1. In eq (5) of the hourglass diffusion transformers, it's mentioned that c_out^{-2}(\sigma) is incorporated, however, based on the definition of c_out, eq (5) should be
min(SNR, \gamma) * (\sigma_data^2 + \sigma^2) / (\sigma_data^2 * \sigma^2).
  1. In the implementation:
    def _weighting_soft_min_snr(self, sigma):
    return (sigma * self.sigma_data) ** 2 / (sigma ** 2 + self.sigma_data ** 2) ** 2

The \gamma=4 or 5 proposed in the paper doesn't seem to be used. Am I missing anything here?

@hmicrobe hmicrobe changed the title Questions about min-snr loss Questions about soft-min-snr loss Feb 20, 2024
@stefan-baumann
Copy link

In this code, gamma is hardcoded to depend on sigma_data, with gamma being chosen as gamma = sigma_data^-2. This, combined with the preconditioner compensation, leads to the formula you're seeing.

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

No branches or pull requests

2 participants