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

How can I deal with images that height is not equal to weight?

Open Mystere271 opened this issue 3 years ago • 2 comments

Hi Lucidrains,

I noticed that height and width of image must be {img_size}, but what if my image's weight and height are different? Does it mean that I have to clip the images? Or is there any more elegant way to handle it?

Thanks!

Mystere271 avatar Oct 14 '22 08:10 Mystere271

No simply change the parameters to a tuple and change the asserts to check on a tuple. Rest will continue working, the UNet does not care if it is square or has a different aspect ratio. At least it worked for me

Mut1nyJD avatar Oct 16 '22 21:10 Mut1nyJD

No simply change the parameters to a tuple and change the asserts to check on a tuple. Rest will continue working, the UNet does not care if it is square or has a different aspect ratio. At least it worked for me

hi cloud you please tell me how about set output size of generative picture?

zuiwomeirenxi avatar Dec 09 '23 10:12 zuiwomeirenxi