Sygil-Dev / stable-diffusion

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Resize mode in img2img : tensor size error

Guizmus opened this issue · comments

Using the webUI, in the img2img module, I get systematic tensor size error in a runtime error if the init picture needs resizing. not the same error as #147 displays so I put this in another issue.

Here is an init image and prompt that do keep generating the error, as well as a screenshot of the error.
unknown
A tropical island, screenshot from Curse of Monkey Island Game, Lucas Arts, Monkey island, digital artwork, ultra detailed

image

I doubt this would change a lot since the error seems to happen before, but the error appeared on mutiple random seeds, I was using k_euler_a, with defaults webUI settings, to be complete

I got the same thing - it turns out that you have to set the same resolution as in the source file. It is often not possible to set the exact resolution of the image in the settings so basically you have to prepare your file to match the resolutions that can be set in webui.

@Guizmus this seems to be a typo, see this comment: Sygil-Dev/sygil-webui#398 (comment)
The location of the file in this repo is stable-diffusion-hlky\scripts\webui.py

I tried the proposed fix, and it works, at least in the proposed test case. I'll report on CompVis#398 too

commented

Pushed major txt2img ui overhaul that has img2img working in my tests
Please update and open a new issue if the problem recurs

RuntimeError: The size of tensor a (128) must match the size of tensor b (96) at non-singleton dimension 3
It's borked again, sir @hlky .

Looks like you didn't update the offending piece of code: https://github.com/hlky/stable-diffusion/blob/main/scripts/webui.py#L1193
The typo is still there (should be "image = image.convert("RGB")")

I'm also having this issue now.

I tested right now after the last commit (fbf814e)

The issue has evolved but is still blocking, I'll open a new issue detailing