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

IMG2IMG: RuntimeError: The size of tensor a (65) must match the size of tensor b (66) at non-singleton dimension 3

Open Giribot opened this issue 1 year ago • 2 comments

Hello !

When i try to make a IMG2IMG with Flux with Neveroom checked, i have this error:

"RuntimeError: The size of tensor a (65) must match the size of tensor b (66) at non-singleton dimension 3
Time taken: 31.6 sec.

A: 0.32 GB, R: 0.38 GB, Sys: 1.2/4 GB (30.1%)"
Never OOM Integrated
▼
X Enabled for UNet (always maximize offload)
X Enabled for VAE (always tiled)

Prompt: a clear black and white photo. a girl in a dress, a baby standing on a chair, a little girl standing in a dress

I can do IMG2IMG with others pictures but not this this one....

Thanks !

456847469_2185741611804988_3495053606784716548_n

Capture d'écran 2024-08-27 105056 Capture d'écran 2024-08-27 105423

Giribot avatar Aug 27 '24 08:08 Giribot

This is speculation, but I've seen a similar issue before, where the model (in my case PixArt Sigma) expects the latent sizes to be a multiple of 2. 526 / 8 = 65.75 which rounds down to 65. Try resizing/expanding the input image so both dimensions are a multiple of 16 (528x720).

DenOfEquity avatar Aug 27 '24 09:08 DenOfEquity

For example, i have no problem to do that with Fooocus.... But the only way to do this by Forge is to open GIMP and crop the picture in 4/3 or 3/4 or 16/9 or 9/16 or 1:1 or 1:2 or 2:1 or ..... (etc etc (as: a known official ratio)).... After, i have no error in forge.... (And in Fooocus, i have no problem and i Can put this picture directly without cropping it in a known ratio). Thanks you ! ❤️❤️❤️👍

Giribot avatar Aug 30 '24 11:08 Giribot