Skip to content

Commit

Permalink
fix for ar < 1
Browse files Browse the repository at this point in the history
  • Loading branch information
alemelis committed Feb 8, 2023
1 parent 0025cca commit a580c34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/sd-webui-ar.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def apply(self, w, h):
if self.ar > 1.0: # fix height, change width
w = self.ar * h
elif self.ar < 1.0: # fix width, change height
h = self.ar * w
h = w / self.ar
else: # set minimum dimension to both
min_dim = min([w, h])
w, h = min_dim, min_dim
Expand Down

0 comments on commit a580c34

Please sign in to comment.