Spaces:
Runtime error
Runtime error
try new `resize_image_dimensions` and seed 42
Browse files
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 %
|
35 |
-
height = height - (height %
|
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 %
|
47 |
-
new_height = new_height - (new_height %
|
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 |
|