Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,7 +8,7 @@ import copy
|
|
| 8 |
import math
|
| 9 |
import time
|
| 10 |
import random
|
| 11 |
-
import spaces
|
| 12 |
import re
|
| 13 |
import uuid
|
| 14 |
|
|
@@ -103,7 +103,7 @@ def check(input_image):
|
|
| 103 |
if input_image is None:
|
| 104 |
raise gr.Error("Please provide an image to restore.")
|
| 105 |
|
| 106 |
-
|
| 107 |
def stage1_process(
|
| 108 |
input_image,
|
| 109 |
gamma_correction,
|
|
@@ -310,43 +310,43 @@ def restore_in_Xmin(
|
|
| 310 |
noisy_image, denoise_image, prompt, a_prompt, n_prompt, num_samples, min_size, downscale, upscale, edm_steps, s_stage1, s_stage2, s_cfg, randomize_seed, seed, s_churn, s_noise, color_fix_type, diff_dtype, ae_dtype, gamma_correction, linear_CFG, linear_s_stage2, spt_linear_CFG, spt_linear_s_stage2, model_select, output_format, allocation
|
| 311 |
)
|
| 312 |
|
| 313 |
-
|
| 314 |
def restore_in_1min(*args, **kwargs):
|
| 315 |
return restore_on_gpu(*args, **kwargs)
|
| 316 |
|
| 317 |
-
|
| 318 |
def restore_in_2min(*args, **kwargs):
|
| 319 |
return restore_on_gpu(*args, **kwargs)
|
| 320 |
|
| 321 |
-
|
| 322 |
def restore_in_3min(*args, **kwargs):
|
| 323 |
return restore_on_gpu(*args, **kwargs)
|
| 324 |
|
| 325 |
-
|
| 326 |
def restore_in_4min(*args, **kwargs):
|
| 327 |
return restore_on_gpu(*args, **kwargs)
|
| 328 |
|
| 329 |
-
|
| 330 |
def restore_in_5min(*args, **kwargs):
|
| 331 |
return restore_on_gpu(*args, **kwargs)
|
| 332 |
|
| 333 |
-
|
| 334 |
def restore_in_6min(*args, **kwargs):
|
| 335 |
return restore_on_gpu(*args, **kwargs)
|
| 336 |
|
| 337 |
-
|
| 338 |
def restore_in_7min(*args, **kwargs):
|
| 339 |
return restore_on_gpu(*args, **kwargs)
|
| 340 |
|
| 341 |
-
|
| 342 |
def restore_in_8min(*args, **kwargs):
|
| 343 |
return restore_on_gpu(*args, **kwargs)
|
| 344 |
|
| 345 |
-
|
| 346 |
def restore_in_9min(*args, **kwargs):
|
| 347 |
return restore_on_gpu(*args, **kwargs)
|
| 348 |
|
| 349 |
-
|
| 350 |
def restore_in_10min(*args, **kwargs):
|
| 351 |
return restore_on_gpu(*args, **kwargs)
|
| 352 |
|
|
|
|
| 8 |
import math
|
| 9 |
import time
|
| 10 |
import random
|
| 11 |
+
#import spaces
|
| 12 |
import re
|
| 13 |
import uuid
|
| 14 |
|
|
|
|
| 103 |
if input_image is None:
|
| 104 |
raise gr.Error("Please provide an image to restore.")
|
| 105 |
|
| 106 |
+
#@spaces.GPU(duration=420)
|
| 107 |
def stage1_process(
|
| 108 |
input_image,
|
| 109 |
gamma_correction,
|
|
|
|
| 310 |
noisy_image, denoise_image, prompt, a_prompt, n_prompt, num_samples, min_size, downscale, upscale, edm_steps, s_stage1, s_stage2, s_cfg, randomize_seed, seed, s_churn, s_noise, color_fix_type, diff_dtype, ae_dtype, gamma_correction, linear_CFG, linear_s_stage2, spt_linear_CFG, spt_linear_s_stage2, model_select, output_format, allocation
|
| 311 |
)
|
| 312 |
|
| 313 |
+
#@spaces.GPU(duration=59)
|
| 314 |
def restore_in_1min(*args, **kwargs):
|
| 315 |
return restore_on_gpu(*args, **kwargs)
|
| 316 |
|
| 317 |
+
#@spaces.GPU(duration=119)
|
| 318 |
def restore_in_2min(*args, **kwargs):
|
| 319 |
return restore_on_gpu(*args, **kwargs)
|
| 320 |
|
| 321 |
+
#@spaces.GPU(duration=179)
|
| 322 |
def restore_in_3min(*args, **kwargs):
|
| 323 |
return restore_on_gpu(*args, **kwargs)
|
| 324 |
|
| 325 |
+
#@spaces.GPU(duration=239)
|
| 326 |
def restore_in_4min(*args, **kwargs):
|
| 327 |
return restore_on_gpu(*args, **kwargs)
|
| 328 |
|
| 329 |
+
#@spaces.GPU(duration=299)
|
| 330 |
def restore_in_5min(*args, **kwargs):
|
| 331 |
return restore_on_gpu(*args, **kwargs)
|
| 332 |
|
| 333 |
+
#@spaces.GPU(duration=359)
|
| 334 |
def restore_in_6min(*args, **kwargs):
|
| 335 |
return restore_on_gpu(*args, **kwargs)
|
| 336 |
|
| 337 |
+
#@spaces.GPU(duration=419)
|
| 338 |
def restore_in_7min(*args, **kwargs):
|
| 339 |
return restore_on_gpu(*args, **kwargs)
|
| 340 |
|
| 341 |
+
#@spaces.GPU(duration=479)
|
| 342 |
def restore_in_8min(*args, **kwargs):
|
| 343 |
return restore_on_gpu(*args, **kwargs)
|
| 344 |
|
| 345 |
+
#@spaces.GPU(duration=539)
|
| 346 |
def restore_in_9min(*args, **kwargs):
|
| 347 |
return restore_on_gpu(*args, **kwargs)
|
| 348 |
|
| 349 |
+
#@spaces.GPU(duration=599)
|
| 350 |
def restore_in_10min(*args, **kwargs):
|
| 351 |
return restore_on_gpu(*args, **kwargs)
|
| 352 |
|