From 77d4e1f5d40e06cc26dc1a2d828d3e7bb8ec3901 Mon Sep 17 00:00:00 2001 From: gesen2egee Date: Sat, 5 Oct 2024 16:06:39 +0800 Subject: [PATCH] fix --- library/train_util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/train_util.py b/library/train_util.py index 1c9f07bfa..1b4a29c3f 100644 --- a/library/train_util.py +++ b/library/train_util.py @@ -5239,8 +5239,8 @@ def get_timesteps_and_huber_c(args, min_timestep, max_timestep, noise_scheduler, timesteps = time_shift(mu, 1.0, timesteps) else: timesteps = (timesteps * shift) / (1 + (shift - 1) * timesteps) - t = timesteps.view(-1, 1, 1, 1) timesteps = min_timestep + (timesteps * (max_timestep - min_timestep)) + timesteps = timesteps.view(-1, 1, 1, 1) else: timesteps = torch.randint(min_timestep, max_timestep, (b_size,), device="cpu")