Spaces:
Sleeping
Sleeping
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -1258,11 +1258,9 @@ def handle_generation(h,w,d):
|
|
1258 |
difficulty_points + 1
|
1259 |
|
1260 |
pxs = h*w
|
1261 |
-
if pxs >
|
1262 |
-
difficulty_points + 3
|
1263 |
-
elif pxs > 3 * (10 ** 6):
|
1264 |
difficulty_points + 2
|
1265 |
-
elif pxs >
|
1266 |
difficulty_points + 1
|
1267 |
|
1268 |
if difficulty_points < 2:
|
@@ -1276,11 +1274,11 @@ def handle_generation(h,w,d):
|
|
1276 |
def easy_generation(h,w,d):
|
1277 |
return generation(h,w,d)
|
1278 |
|
1279 |
-
@spaces.GPU(duration=
|
1280 |
def balanced_generation(h,w,d):
|
1281 |
return generation(h,w,d)
|
1282 |
|
1283 |
-
@spaces.GPU(duration=
|
1284 |
def hard_generation(h,w,d):
|
1285 |
return generation(h,w,d)
|
1286 |
|
@@ -1343,7 +1341,7 @@ if __name__ == "__main__":
|
|
1343 |
height = gr.Slider(
|
1344 |
label="Height (px)",
|
1345 |
minimum=512,
|
1346 |
-
maximum=
|
1347 |
step=16,
|
1348 |
value=1024,
|
1349 |
)
|
@@ -1351,7 +1349,7 @@ if __name__ == "__main__":
|
|
1351 |
width = gr.Slider(
|
1352 |
label="Width (px)",
|
1353 |
minimum=512,
|
1354 |
-
maximum=
|
1355 |
step=16,
|
1356 |
value=1024,
|
1357 |
)
|
@@ -1390,7 +1388,7 @@ if __name__ == "__main__":
|
|
1390 |
outputs=[cover]
|
1391 |
)
|
1392 |
upscale_now.click(
|
1393 |
-
fn=
|
1394 |
inputs=[cover],
|
1395 |
outputs=[cover]
|
1396 |
)
|
|
|
1258 |
difficulty_points + 1
|
1259 |
|
1260 |
pxs = h*w
|
1261 |
+
if pxs > 2 * (10 ** 6):
|
|
|
|
|
1262 |
difficulty_points + 2
|
1263 |
+
elif pxs > 1 * (10 ** 6):
|
1264 |
difficulty_points + 1
|
1265 |
|
1266 |
if difficulty_points < 2:
|
|
|
1274 |
def easy_generation(h,w,d):
|
1275 |
return generation(h,w,d)
|
1276 |
|
1277 |
+
@spaces.GPU(duration=210)
|
1278 |
def balanced_generation(h,w,d):
|
1279 |
return generation(h,w,d)
|
1280 |
|
1281 |
+
@spaces.GPU(duration=270)
|
1282 |
def hard_generation(h,w,d):
|
1283 |
return generation(h,w,d)
|
1284 |
|
|
|
1341 |
height = gr.Slider(
|
1342 |
label="Height (px)",
|
1343 |
minimum=512,
|
1344 |
+
maximum=1536,
|
1345 |
step=16,
|
1346 |
value=1024,
|
1347 |
)
|
|
|
1349 |
width = gr.Slider(
|
1350 |
label="Width (px)",
|
1351 |
minimum=512,
|
1352 |
+
maximum=1536,
|
1353 |
step=16,
|
1354 |
value=1024,
|
1355 |
)
|
|
|
1388 |
outputs=[cover]
|
1389 |
)
|
1390 |
upscale_now.click(
|
1391 |
+
fn=handle_upscaler,
|
1392 |
inputs=[cover],
|
1393 |
outputs=[cover]
|
1394 |
)
|