Fabrice-TIERCELIN commited on
Commit
c4f731c
1 Parent(s): ff6a8f8

Stable Diffusion 3 Medium

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -10,6 +10,7 @@ import time
10
  import random
11
  import spaces
12
  import re
 
13
 
14
  from gradio_imageslider import ImageSlider
15
  from PIL import Image
@@ -377,6 +378,9 @@ def restore(
377
  " pixels large and " + str(result_height) + \
378
  " pixels high, so a resolution of " + f'{result_width * result_height:,}' + " pixels."
379
  print(information)
 
 
 
380
 
381
  # Only one image can be shown in the slider
382
  return [noisy_image] + [results[0]], gr.update(label="Downloadable results in *." + output_format + " format", format = output_format, value = results), gr.update(value = information, visible = True)
@@ -437,7 +441,7 @@ title_html = """
437
  SUPIR is for beauty and illustration only.
438
  Most of the processes only last few minutes.
439
  This demo can handle huge images but the process will be aborted if it lasts more than 10 min.
440
- If you want to upscale AI-generated images, be noticed that <i>Stable Diffusion Medium</i> spaces can directly generate 1536x1536 images.
441
  Please leave a <a href="https://huggingface.co/spaces/Fabrice-TIERCELIN/SUPIR/discussions/new">message in discussion</a> if you encounter issues.
442
 
443
  <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>
 
10
  import random
11
  import spaces
12
  import re
13
+ import uuid
14
 
15
  from gradio_imageslider import ImageSlider
16
  from PIL import Image
 
378
  " pixels large and " + str(result_height) + \
379
  " pixels high, so a resolution of " + f'{result_width * result_height:,}' + " pixels."
380
  print(information)
381
+ unique_name = str(uuid.uuid4()) + ".png"
382
+ results[0].save(unique_name)
383
+ print(unique_name)
384
 
385
  # Only one image can be shown in the slider
386
  return [noisy_image] + [results[0]], gr.update(label="Downloadable results in *." + output_format + " format", format = output_format, value = results), gr.update(value = information, visible = True)
 
441
  SUPIR is for beauty and illustration only.
442
  Most of the processes only last few minutes.
443
  This demo can handle huge images but the process will be aborted if it lasts more than 10 min.
444
+ If you want to upscale AI-generated images, be noticed that <i>Stable Diffusion 3 Medium</i> spaces can directly generate 1536x1536 images.
445
  Please leave a <a href="https://huggingface.co/spaces/Fabrice-TIERCELIN/SUPIR/discussions/new">message in discussion</a> if you encounter issues.
446
 
447
  <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>