denoising-diffusion-pytorch icon indicating copy to clipboard operation
denoising-diffusion-pytorch copied to clipboard

Just a tiny change will allow sampling at different resolutions.

Open hizzlehoff opened this issue 2 years ago • 0 comments

I am doing this locally but it would be great if the package had this small change to allow sampling at different resolutions:

Line 627 in denoising_diffusion_pytorch.py: @torch.no_grad() def sample(self, batch_size = 16, widthMultiplier = 1, heightMultiplier = 1): image_size, channels = self.image_size, self.channels sample_fn = self.p_sample_loop if not self.is_ddim_sampling else self.ddim_sample return sample_fn((batch_size, channels, int(image_size * heightMultiplier), int(image_size * widthMultiplier) ))

hizzlehoff avatar Nov 26 '22 12:11 hizzlehoff