Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Just a tiny change will allow sampling at different resolutions. #130

Open
hizzlehoff opened this issue Nov 26, 2022 · 0 comments
Open

Just a tiny change will allow sampling at different resolutions. #130

hizzlehoff opened this issue Nov 26, 2022 · 0 comments

Comments

@hizzlehoff
Copy link

hizzlehoff commented Nov 26, 2022

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) ))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant