finish pndm sampler

This commit is contained in:
Patrick von Platen 2022-07-21 01:51:58 +00:00
parent 394243ce98
commit 606ac57e50
1 changed files with 0 additions and 10 deletions

View File

@ -49,16 +49,6 @@ class PNDMPipeline(DiffusionPipeline):
image = self.scheduler.step(model_output, t, image)["prev_sample"] image = self.scheduler.step(model_output, t, image)["prev_sample"]
# for i, t in enumerate(tqdm(self.scheduler.prk_timesteps)):
# model_output = self.unet(image, t)["sample"]
#
# image = self.scheduler.step_prk(model_output, t, image, i=i)["prev_sample"]
#
# for i, t in enumerate(tqdm(self.scheduler.plms_timesteps)):
# model_output = self.unet(image, t)["sample"]
#
# image = self.scheduler.step_plms(model_output, t, image, i=i)["prev_sample"]
image = (image / 2 + 0.5).clamp(0, 1) image = (image / 2 + 0.5).clamp(0, 1)
image = image.cpu().permute(0, 2, 3, 1).numpy() image = image.cpu().permute(0, 2, 3, 1).numpy()
if output_type == "pil": if output_type == "pil":