0.6.1 fix tqdm func check with difference call behavior from gr.Progress()

This commit is contained in:
SWivid
2025-02-22 08:33:10 +08:00
parent 85e6c660b0
commit a72f2f8efb
2 changed files with 3 additions and 3 deletions

View File

@@ -500,13 +500,13 @@ def infer_batch_process(
yield generated_wave, generated_mel_spec[0].cpu().numpy()
if streaming:
for gen_text in progress.tqdm(gen_text_batches) if progress else gen_text_batches:
for gen_text in progress.tqdm(gen_text_batches) if progress is not None else gen_text_batches:
for chunk in process_batch(gen_text):
yield chunk
else:
with ThreadPoolExecutor() as executor:
futures = [executor.submit(process_batch, gen_text) for gen_text in gen_text_batches]
for future in progress.tqdm(futures) if progress else futures:
for future in progress.tqdm(futures) if progress is not None else futures:
result = future.result()
if result:
generated_wave, generated_mel_spec = next(result)