Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -275,7 +275,8 @@ class RetroArtConverter:
|
|
| 275 |
width = (width // 8) * 8
|
| 276 |
height = (height // 8) * 8
|
| 277 |
|
| 278 |
-
|
|
|
|
| 279 |
|
| 280 |
def add_trigger_word(self, prompt):
|
| 281 |
"""Add trigger word to prompt if not present"""
|
|
@@ -302,6 +303,8 @@ class RetroArtConverter:
|
|
| 302 |
|
| 303 |
# Calculate optimal size
|
| 304 |
original_width, original_height = input_image.size
|
|
|
|
|
|
|
| 305 |
target_width, target_height = self.calculate_optimal_size(original_width, original_height)
|
| 306 |
|
| 307 |
print(f"Resizing from {original_width}x{original_height} to {target_width}x{target_height}")
|
|
|
|
| 275 |
width = (width // 8) * 8
|
| 276 |
height = (height // 8) * 8
|
| 277 |
|
| 278 |
+
# Convert to Python int to avoid numpy int64 issues
|
| 279 |
+
return int(width), int(height)
|
| 280 |
|
| 281 |
def add_trigger_word(self, prompt):
|
| 282 |
"""Add trigger word to prompt if not present"""
|
|
|
|
| 303 |
|
| 304 |
# Calculate optimal size
|
| 305 |
original_width, original_height = input_image.size
|
| 306 |
+
original_width = int(original_width)
|
| 307 |
+
original_height = int(original_height)
|
| 308 |
target_width, target_height = self.calculate_optimal_size(original_width, original_height)
|
| 309 |
|
| 310 |
print(f"Resizing from {original_width}x{original_height} to {target_width}x{target_height}")
|