stable-diffusion icon indicating copy to clipboard operation
stable-diffusion copied to clipboard

Tensor size error

Open fredrix96 opened this issue 3 years ago • 4 comments

I get the error: RuntimeError: SIzes of tensors must match except in dimension 1. Expected size 23 for tensor number 1 in the list.

I have a GTX 1080. The weird thing is that it does work sometimes to run the program, but I mostly get this error.

Sorry if I missed something obvious.

fredrix96 avatar Aug 24 '22 14:08 fredrix96

Hi, the image dimension (--H, --W) should be a multiple of 64, else it gives this error.

basujindal avatar Aug 24 '22 14:08 basujindal

Hi, the image dimension (--H, --W) should be a multiple of 64, else it gives this error.

Suggestion: might be useful to have automatic rounding. I added the following lines: adjH = 64 * round(opt.H / 64) adjW = 64 * round(opt.W / 64)

Afterwards, just replaced instances of "opt.H" and "opt.W" with "adjH" and "adjW".

GucciFlipFlops1917 avatar Aug 24 '22 16:08 GucciFlipFlops1917

Oh okay, thank you! I just took a 9:16 resolution, but guess I have to go for a different one then

fredrix96 avatar Aug 24 '22 16:08 fredrix96

Hi, the image dimension (--H, --W) should be a multiple of 64, else it gives this error.

Suggestion: might be useful to have automatic rounding. I added the following lines: adjH = 64 * round(opt.H / 64) adjW = 64 * round(opt.W / 64)

Afterwards, just replaced instances of "opt.H" and "opt.W" with "adjH" and "adjW".

This sounds smart. I will add that

fredrix96 avatar Aug 24 '22 16:08 fredrix96