SkalskiP commited on
Commit
d2b30ac
1 Parent(s): 11414b7

try new `resize_image_dimensions` and seed 42

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -31,8 +31,8 @@ def resize_image_dimensions(
31
  width, height = original_resolution_wh
32
 
33
  if width <= maximum_dimension and height <= maximum_dimension:
34
- width = width - (width % 8)
35
- height = height - (height % 8)
36
  return width, height
37
 
38
  if width > height:
@@ -43,8 +43,8 @@ def resize_image_dimensions(
43
  new_width = int(width * scaling_factor)
44
  new_height = int(height * scaling_factor)
45
 
46
- new_width = new_width - (new_width % 8)
47
- new_height = new_height - (new_height % 8)
48
 
49
  return new_width, new_height
50
 
 
31
  width, height = original_resolution_wh
32
 
33
  if width <= maximum_dimension and height <= maximum_dimension:
34
+ width = width - (width % 32)
35
+ height = height - (height % 32)
36
  return width, height
37
 
38
  if width > height:
 
43
  new_width = int(width * scaling_factor)
44
  new_height = int(height * scaling_factor)
45
 
46
+ new_width = new_width - (new_width % 32)
47
+ new_height = new_height - (new_height % 32)
48
 
49
  return new_width, new_height
50