added customized patches and updated the README

This commit is contained in:
Lincoln Stein
2022-08-16 21:34:37 -04:00
parent d39f5b51a8
commit d6124c44a3
8 changed files with 505 additions and 10 deletions

View File

@ -255,7 +255,7 @@ class DDPM(pl.LightningModule):
b = shape[0]
img = torch.randn(shape, device=device)
intermediates = [img]
for i in tqdm(reversed(range(0, self.num_timesteps)), desc='Sampling t', total=self.num_timesteps):
for i in tqdm(reversed(range(0, self.num_timesteps)), desc='Sampling t', total=self.num_timesteps, dynamic_ncols=True):
img = self.p_sample(img, torch.full((b,), i, device=device, dtype=torch.long),
clip_denoised=self.clip_denoised)
if i % self.log_every_t == 0 or i == self.num_timesteps - 1: