diffusers icon indicating copy to clipboard operation
diffusers copied to clipboard

fix min-snr implementation

Open ethansmith2000 opened this issue 8 months ago • 2 comments

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

  • Schedulers: @yiyixuxu
  • Training examples: @sayakpaul

ethansmith2000 avatar Jun 11 '24 00:06 ethansmith2000