Fabrice-TIERCELIN commited on
Commit
513338c
1 Parent(s): 4fb40d7

print('Exception of type ' + str(type(e)))

Browse files
Files changed (1) hide show
  1. app.py +9 -1
app.py CHANGED
@@ -106,7 +106,14 @@ def stage1_process(
106
  print('<<== stage1_process')
107
  return LQ, gr.update(visible = True)
108
 
109
- def stage2_process(
 
 
 
 
 
 
 
110
  noisy_image,
111
  rotation,
112
  denoise_image,
@@ -439,6 +446,7 @@ title_html = """
439
  SUPIR is for beauty and illustration only.
440
  Most of the processes only last few minutes.
441
  This demo can handle huge images but the process will be aborted if it lasts more than 10 min.
 
442
  Please leave a <a href="https://huggingface.co/spaces/Fabrice-TIERCELIN/SUPIR/discussions/new">message in discussion</a> if you encounter issues.
443
 
444
  <p><center><a href="https://arxiv.org/abs/2401.13627">Paper</a> &emsp; <a href="http://supir.xpixel.group/">Project Page</a> &emsp; <a href="https://huggingface.co/blog/MonsterMMORPG/supir-sota-image-upscale-better-than-magnific-ai">Local Install Guide</a></center></p>
 
106
  print('<<== stage1_process')
107
  return LQ, gr.update(visible = True)
108
 
109
+ def stage2_process(*args, **kwargs):
110
+ try:
111
+ return restore_in_Xmin(*args, **kwargs)
112
+ except Exception as e:
113
+ print('Exception of type ' + str(type(e)))
114
+ raise e
115
+
116
+ def restore_in_Xmin(
117
  noisy_image,
118
  rotation,
119
  denoise_image,
 
446
  SUPIR is for beauty and illustration only.
447
  Most of the processes only last few minutes.
448
  This demo can handle huge images but the process will be aborted if it lasts more than 10 min.
449
+ If you want to upscale AI-generated images, be noticed that <i>Stable Diffusion Medium</i> spaces can directly generate 1536x1536 images.
450
  Please leave a <a href="https://huggingface.co/spaces/Fabrice-TIERCELIN/SUPIR/discussions/new">message in discussion</a> if you encounter issues.
451
 
452
  <p><center><a href="https://arxiv.org/abs/2401.13627">Paper</a> &emsp; <a href="http://supir.xpixel.group/">Project Page</a> &emsp; <a href="https://huggingface.co/blog/MonsterMMORPG/supir-sota-image-upscale-better-than-magnific-ai">Local Install Guide</a></center></p>