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

[set width] and [set height] are not applied correctly when batch count > 1 #197

Open
3 tasks done
tomsy127 opened this issue Sep 14, 2023 · 3 comments
Open
3 tasks done
Labels
bug Something isn't working

Comments

@tomsy127
Copy link

Due diligence

  • I checked for similar issues and couldn't find any.
  • My WebUI and Unprompted are both up-to-date.
  • I disabled my other extensions but the problem persists.

Describe the bug

I'm sorry for my bad English, so I was used a screen capture.
It appears that the results of [set width] and [set height], which should have been applied when batch_count=X, have been applied to the image with batch_count=X+1.

Prompt

1girl standing
[set width][choose]256|512|768[/choose][/set]
[set height][choose]256|512|768[/choose][/set]

Negative Prompt

(worst quality:1.2)

Other settings and the issue example

20230914_01

Prompt

No response

Log output

No response

Unprompted version

9.16.1

WebUI version

1.6

Other comments

No response

@tomsy127 tomsy127 added the bug Something isn't working label Sep 14, 2023
@ThereforeGames
Copy link
Owner

Hi tomsy127,

Thank you for reaching out.

I am not sure if I understand the issue correctly. Based on your prompt, Unprompted will [choose] a random width and height of 256|512|768 and your screenshot shows that it selected 256x768 for the third image. This is an expected outcome.

If you want the batch count to determine your image dimensions, you need to pass batch_real_index into the _case kwarg of your [choose] blocks. Here is an example:

1girl standing
[set width][choose _case="{get batch_real_index}"]256|512|768[/choose][/set]
[set height][choose _case="{get batch_real_index}"]256|512|768[/choose][/set]

I hope this helps. Please let me know if you have any questions.

@ThereforeGames ThereforeGames closed this as not planned Won't fix, can't repro, duplicate, stale Oct 14, 2023
@tomsy127
Copy link
Author

Thank you for your reply.

What I meant to say is that the image size chosen by Unprompted is different from the actual image size.
In the example image, the third image is a square, but the "Size" is 256x768 (it matches the actual size of the fourth image).
This seems to have a negative effect, such as not applying the correct resolution when generated with Hiresfix.

image

image

I'm sorry to bother you again.

@ThereforeGames
Copy link
Owner

Hi @tomsy127,

Thank you for clarifying - I see what you mean now. It seems there is a "delay" in updating the width and height properties of a batch process by 1 image. Very strange. It seems to be happening regardless of hires fix on my device.

I will re-open this issue and investigate further.

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

No branches or pull requests

2 participants