Spaces:
Runtime error
Runtime error
Update model.py
Browse files
model.py
CHANGED
|
@@ -71,7 +71,7 @@ def resize_to_closest_aspect_ratio(image):
|
|
| 71 |
new_width, new_height = SD_XL_BASE_RATIOS[closest_ratio]
|
| 72 |
|
| 73 |
# Resize the image to the new dimensions while preserving the aspect ratio
|
| 74 |
-
resized_image = image.resize((new_width, new_height), PIL.Image.
|
| 75 |
|
| 76 |
return resized_image
|
| 77 |
|
|
|
|
| 71 |
new_width, new_height = SD_XL_BASE_RATIOS[closest_ratio]
|
| 72 |
|
| 73 |
# Resize the image to the new dimensions while preserving the aspect ratio
|
| 74 |
+
resized_image = image.resize((new_width, new_height), PIL.Image.LANCZOS)
|
| 75 |
|
| 76 |
return resized_image
|
| 77 |
|