Skip to content
This repository has been archived by the owner on Sep 7, 2022. It is now read-only.

Resize mode in img2img : tensor size error #200

Closed
Guizmus opened this issue Sep 1, 2022 · 7 comments
Closed

Resize mode in img2img : tensor size error #200

Guizmus opened this issue Sep 1, 2022 · 7 comments

Comments

@Guizmus
Copy link

Guizmus commented Sep 1, 2022

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

@adamesko
Copy link

adamesko commented Sep 1, 2022

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.

@Angelore
Copy link

Angelore commented Sep 1, 2022

@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

@Guizmus
Copy link
Author

Guizmus commented Sep 1, 2022

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

@hlky
Copy link

hlky commented Sep 1, 2022

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

@hlky hlky closed this as completed Sep 1, 2022
@Angelore
Copy link

Angelore commented Sep 1, 2022

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

@bbecausereasonss
Copy link

I'm also having this issue now.

@Guizmus
Copy link
Author

Guizmus commented Sep 1, 2022

I tested right now after the last commit (fbf814e)

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

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

No branches or pull requests

5 participants