plms works, bugs quashed

- The plms sampler now works with custom inpainting model
- Quashed bug that was causing generation on normal models to fail (oops!)
- Can now generate non-square images with custom inpainting model

Credits for advice and assistance during porting:

@any-winter-4079 (http://github.com/any-winter-4079)
@db3000 (Danny Beer http://github.com/db3000)
This commit is contained in:
Lincoln Stein
2022-10-25 11:42:30 -04:00
parent b101be041b
commit e33971fe2c
5 changed files with 33 additions and 28 deletions

View File

@@ -45,7 +45,7 @@ class PLMSSampler(Sampler):
else:
x_in = torch.cat([x] * 2)
t_in = torch.cat([t] * 2)
c_in = torch.cat([unconditional_conditioning, c])
c_in = self.make_cond_in(unconditional_conditioning, c)
e_t_uncond, e_t = self.model.apply_model(
x_in, t_in, c_in
).chunk(2)