Skip to content

Commit

Permalink
Update: Modify tqdm progress bar problem.
Browse files Browse the repository at this point in the history
  • Loading branch information
chairc committed Aug 16, 2023
1 parent 3089bb8 commit b1ea7c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion model/ddpm.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def sample(self, model, n, labels=None, cfg_scale=None):
# Input dim: [n, 3, img_size, img_size]
x = torch.randn((n, 3, self.img_size, self.img_size)).to(self.device)
# 'reversed(range(1, self.noise_steps)' iterates over a sequence of integers in reverse
for i in tqdm(reversed(range(1, self.noise_steps)), position=0):
for i in tqdm(reversed(range(1, self.noise_steps)), position=0, total=self.noise_steps - 1):
# Time step, creating a tensor of size n
t = (torch.ones(n) * i).long().to(self.device)
# Whether the network has conditional input, such as multiple category input
Expand Down

0 comments on commit b1ea7c3

Please sign in to comment.