[set width] and [set height] are not applied correctly when batch count > 1
Due diligence
- [X] I checked for similar issues and couldn't find any.
- [X] My WebUI and Unprompted are both up-to-date.
- [X] 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
Prompt
No response
Log output
No response
Unprompted version
9.16.1
WebUI version
1.6
Other comments
No response
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.
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.
I'm sorry to bother you again.
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.