From: Francois Fleuret Date: Fri, 12 Aug 2022 08:01:40 +0000 (+0200) Subject: Update. X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=commitdiff_plain;h=317cc211cf9589a9eee5d937f0d0182719f24790;p=pytorch.git Update. --- diff --git a/minidiffusion.py b/minidiffusion.py index 037ef11..6855752 100755 --- a/minidiffusion.py +++ b/minidiffusion.py @@ -74,7 +74,8 @@ x = torch.randn(10000, 1) for t in range(T-1, -1, -1): z = torch.zeros(x.size()) if t == 0 else torch.randn(x.size()) input = torch.cat((x, torch.ones(x.size(0), 1) * 2 * t / T - 1), 1) - x = 1 / alpha[t].sqrt() * (x - (1 - alpha[t])/(1 - alpha_bar[t]).sqrt() * model(input)) + sigma[t] * z + x = 1 / alpha[t].sqrt() * (x - (1 - alpha[t])/(1 - alpha_bar[t]).sqrt() * model(input)) \ + + sigma[t] * z ###################################################################### # Plot