Spaces:
Running
on
Zero
Running
on
Zero
Must be divisble by 16
Browse files
app.py
CHANGED
@@ -48,9 +48,9 @@ else:
|
|
48 |
|
49 |
def calculate_optimal_dimensions(image: Image.Image) -> tuple[int, int]:
|
50 |
width, height = image.size
|
51 |
-
# Ensure dimensions are multiples of
|
52 |
-
width = (width //
|
53 |
-
height = (height //
|
54 |
|
55 |
return int(width), int(height)
|
56 |
|
|
|
48 |
|
49 |
def calculate_optimal_dimensions(image: Image.Image) -> tuple[int, int]:
|
50 |
width, height = image.size
|
51 |
+
# Ensure dimensions are multiples of 16
|
52 |
+
width = (width // 16) * 16
|
53 |
+
height = (height // 16) * 16
|
54 |
|
55 |
return int(width), int(height)
|
56 |
|