Incorrect control image dimension calculation on qwen_image_edit_plus
This is for bugs only
Did you already ask in the discord?
No
You verified that this is a bug and not a feature request or question by asking in the discord?
Yes
Describe the bug
on L177-180 of qwen_image_edit_plus.py, I think the dimension resizing operations here is a bit odd:
https://github.com/ostris/ai-toolkit/blob/26f4f0245332feb9253c49b56c555777ed52a0e6/extensions_built_in/diffusion_models/qwen_image/qwen_image_edit_plus.py#L177-L180
L177-178 showed that the aspect ratio was calculated with height / width, hence we could obtain the rescaled height via math.sqrt(CONDITION_IMAGE_SIZE * ratio), but the code seemed to be incorrect with the width and height calculation. This also happened across all the control image related dimension calculation:
https://github.com/ostris/ai-toolkit/blob/26f4f0245332feb9253c49b56c555777ed52a0e6/extensions_built_in/diffusion_models/qwen_image/qwen_image_edit_plus.py#L259-L261
I wonder is this intended or its a bug?