Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Update train_util.py

Update train_util.py
  • Loading branch information
gesen2egee committed Oct 5, 2024
1 parent 061ff89 commit 10c3af8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/train_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
Sequence,
Tuple,
Union,
Callable,
)
from accelerate import Accelerator, InitProcessGroupKwargs, DistributedDataParallelKwargs, PartialState
import glob
Expand Down Expand Up @@ -5239,7 +5240,6 @@ 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))
else:
timesteps = torch.randint(min_timestep, max_timestep, (b_size,), device="cpu")
Expand Down

0 comments on commit 10c3af8

Please sign in to comment.