mirror of
https://github.com/THUDM/CogVideo.git
synced 2026-05-08 07:58:10 +08:00
Merge 9f548bce116de35a2e658d5e6a18558df1a99ea6 into 7a1af7154511e0ce4e4be8d62faa8c5e5a3532d2
This commit is contained in:
commit
57bce4ac4b
@ -121,7 +121,7 @@ class VideoDiffusionLoss(StandardDiffusionLoss):
|
||||
w = append_dims(1 / (1 - alphas_cumprod_sqrt**2), input.ndim) # v-pred
|
||||
|
||||
if self.min_snr_value is not None:
|
||||
w = min(w, self.min_snr_value)
|
||||
w = torch.clamp(w, max=self.min_snr_value)
|
||||
return self.get_loss(model_output, input, w)
|
||||
|
||||
def get_loss(self, model_output, target, w):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user