Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Img2Img/Inpaint don't respect Max size/Base size #150

Open
klsic opened this issue May 13, 2023 · 5 comments
Open

Img2Img/Inpaint don't respect Max size/Base size #150

klsic opened this issue May 13, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@klsic
Copy link

klsic commented May 13, 2023

Img2Img/Inpaint don't respect Max size/Base size. Creating a rectangle selection of 768X768 will cause an image to be generated at 768x768 instead of whatever is specified in Max Size. Txt2Img doesn't have this issue.

@Interpause
Copy link
Owner

Can you screenshot the console output? Should log "img size: ...x... -> ...x..." somewhere.

@klsic
Copy link
Author

klsic commented May 14, 2023

sd issues

Note the changes in it/s, its generating at imgsize 1224 with img2img.

@drhead
Copy link

drhead commented May 17, 2023

Related: I think upscaling is broken independently of this bug. While that aspect isn't reproducible on the main branch, I suspect it is there. On @JasonS09 's ControlNet branch, the resolution setting is respected (when you have controlnet enabled anyways, which goes down a different code path), but the image isn't run through an upscaler and the output is grainy. I am quite certain it did work before the latest WebUI update.

@TRGLN
Copy link

TRGLN commented May 18, 2023

@Interpause
I have the same problem.
After tests, I found that the set resolution in the base / max size settings is ignored,
but it still respects the relative proportions of the set values ​​in the base/max size (provided that base/max size is less than the selected area).
And even in mode with the Disable base/max size option enabled
In txt2img mode everything works correctly

Case 1:
img2img
not used "disable base/max size"
base size: 512
max size: 1024
canvas size: 1024x2048
select zone: 1024x2048
image
result: render in 1024x2048

Case 2:
img2img
not used "disable base/max size"
base size: 512
max size: 1024
canvas size: 1024x2048
select zone: 115x96
image
result: render in 120x96

Case 3:
img2img
used "disable base/max size"
canvas size: 1024x2048
select zone: 115x96
image
result: render in 120x96

Case 4:
img2img
not used "disable base/max size"
base size: 64
max size: 64
canvas size: 1024x2048
select zone: 263x603
imageresult: render in 600x600

Case 5:
img2img
used "disable base/max size"
but in the hidden settings there are values - base: 64 max: 64
canvas size: 1024x2048
select zone: 263x603
image
result: render in 600x600

info:
win11
rtx 3070 laptop version
Krita 5.1.1

Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Version: v1.2.1
Commit hash: 89f9faa63388756314e8a1d96cf86bf5e0663045
Installing requirements
[auto-sd-paint-ext] Commit hash: 0071435
[auto-sd-paint-ext] Auto-update disabled.
Launching Web UI with arguments: --theme=dark --xformers --api

@TRGLN
Copy link

TRGLN commented May 19, 2023

I seem to have solved the problem, but I'm not sure if I did it the right way.
It is required to change the value in line 275 to any other than 1
https://github.com/Interpause/auto-sd-paint-ext/blob/main/backend/app.py#L275
1, # selected_scale_tab > 0, # selected_scale_tab

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging a pull request may close this issue.

4 participants