Fixing bug where width and height are inverted for control image resizing (#707)

This commit is contained in:
abionda-sc
2026-03-28 19:00:32 +00:00
committed by GitHub
parent 700c4b53d0
commit 4ef5cbe5bc
3 changed files with 8 additions and 8 deletions

View File

@@ -377,8 +377,8 @@ class Flux2Model(BaseModel):
"match_target_res", False
):
ratio = control_img.shape[2] / control_img.shape[3]
c_width = math.sqrt(control_image_res * ratio)
c_height = c_width / ratio
c_height = math.sqrt(control_image_res * ratio)
c_width = c_height / ratio
c_width = round(c_width / 32) * 32
c_height = round(c_height / 32) * 32