Skip to content

Commit fd78746

Browse files
authored
fix tqdm bug
1 parent 82527a3 commit fd78746

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

usr/diff/shallow_diffusion_tts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ def forward(self, txt_tokens, mel2ph=None, spk_embed=None,
265265
x = torch.randn(shape, device=device)
266266
self.noise_list = deque(maxlen=4)
267267
iteration_interval = 5
268-
for i in tqdm(reversed(range(0, t, iteration_interval)), desc='sample time step', total=t):
268+
for i in tqdm(reversed(range(0, t, iteration_interval)), desc='sample time step', total=t // iteration_interval):
269269
x = self.p_sample_plms(x, torch.full((b,), i, device=device, dtype=torch.long), iteration_interval, cond)
270270
x = x[:, 0].transpose(1, 2)
271271
if mel2ph is not None: # for singing

0 commit comments

Comments
 (0)