From 317cc211cf9589a9eee5d937f0d0182719f24790 Mon Sep 17 00:00:00 2001 From: Francois Fleuret Date: Fri, 12 Aug 2022 10:01:40 +0200 Subject: [PATCH] Update. --- minidiffusion.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.39.5