mirror of
https://github.com/huggingface/diffusers.git
synced 2026-01-29 07:22:12 +03:00
Make tqdm calls notebook-compatible - follow-up
This commit is contained in:
@@ -817,7 +817,7 @@ class GlidePipeline(DiffusionPipeline):
|
||||
num_trained_timesteps = self.upscale_scheduler.timesteps
|
||||
inference_step_times = range(0, num_trained_timesteps, num_trained_timesteps // num_inference_steps_upscale)
|
||||
|
||||
for t in tqdm.tqdm(reversed(range(num_inference_steps_upscale)), total=num_inference_steps_upscale):
|
||||
for t in tqdm(reversed(range(num_inference_steps_upscale)), total=num_inference_steps_upscale):
|
||||
# 1. predict noise residual
|
||||
with torch.no_grad():
|
||||
time_input = torch.tensor([inference_step_times[t]] * image.shape[0], device=torch_device)
|
||||
|
||||
@@ -53,7 +53,7 @@ class PNDMPipeline(DiffusionPipeline):
|
||||
image = self.scheduler.step_prk(model_output, t, image, num_inference_steps)["prev_sample"]
|
||||
|
||||
timesteps = self.scheduler.get_time_steps(num_inference_steps)
|
||||
for t in tqdm.tqdm(range(len(timesteps))):
|
||||
for t in tqdm(range(len(timesteps))):
|
||||
t_orig = timesteps[t]
|
||||
model_output = self.unet(image, t_orig)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user