Fabrice-TIERCELIN commited on
Commit
aebf4d2
1 Parent(s): 856f850

Activate Half & VAE

Browse files
Files changed (1) hide show
  1. gradio_demo.py +6 -6
gradio_demo.py CHANGED
@@ -29,8 +29,8 @@ parser.add_argument("--port", type=int, default='6688')
29
  parser.add_argument("--no_llava", action='store_true', default=True)#False
30
  parser.add_argument("--use_image_slider", action='store_true', default=False)
31
  parser.add_argument("--log_history", action='store_true', default=False)
32
- parser.add_argument("--loading_half_params", action='store_true', default=False)#False
33
- parser.add_argument("--use_tile_vae", action='store_true', default=False)#False
34
  parser.add_argument("--encoder_tile_size", type=int, default=512)
35
  parser.add_argument("--decoder_tile_size", type=int, default=64)
36
  parser.add_argument("--load_8bit_llava", action='store_true', default=False)
@@ -231,9 +231,9 @@ if torch.cuda.device_count() == 0:
231
  """
232
  else:
233
  title_md = """
234
- <h1><center>SUPIR: Practicing Model Scaling for Photo-Realistic Image Restoration</center></h1>
235
 
236
- ⚠️SUPIR is still a research project under tested and is not yet a stable commercial product.
237
 
238
  <a href="https://arxiv.org/abs/2401.13627">Paper</a> &emsp; <a href="http://supir.xpixel.group/">Project Page</a> &emsp; <a href="https://github.com/Fanghua-Yu/SUPIR/blob/master/assets/DemoGuide.png">How to play</a> &emsp; <a href="https://huggingface.co/blog/MonsterMMORPG/supir-sota-image-upscale-better-than-magnific-ai">Local Install Guide</a>
239
  <p style="background-color: blue;">For now, only the restoring is working (the most important one). The pre-denoising and LLaVa description are failing. LLaVa is disabled.</p>
@@ -338,9 +338,9 @@ with gr.Blocks(title='SUPIR') as interface:
338
  diffusion_button = gr.Button(value="🚀 Restore", variant = "primary")
339
  with gr.Row():
340
  with gr.Column():
341
- param_setting = gr.Radio(["Quality", "Fidelity"], interactive=True, label="Param Setting", value="Quality")
342
  with gr.Column():
343
- restart_button = gr.Button(value="Reset Param", scale=2, variant="stop")
344
 
345
  with gr.Accordion("Feedback", open=True):
346
  fb_score = gr.Slider(label="Feedback Score", minimum=1, maximum=5, value=3, step=1,
 
29
  parser.add_argument("--no_llava", action='store_true', default=True)#False
30
  parser.add_argument("--use_image_slider", action='store_true', default=False)
31
  parser.add_argument("--log_history", action='store_true', default=False)
32
+ parser.add_argument("--loading_half_params", action='store_true', default=True)#False
33
+ parser.add_argument("--use_tile_vae", action='store_true', default=True)#False
34
  parser.add_argument("--encoder_tile_size", type=int, default=512)
35
  parser.add_argument("--decoder_tile_size", type=int, default=64)
36
  parser.add_argument("--load_8bit_llava", action='store_true', default=False)
 
231
  """
232
  else:
233
  title_md = """
234
+ <h1><center>SUPIR Image Upscaler</center></h1>
235
 
236
+ SUPIR is a practicing model scaling for photo-realistic image restoration. It is still a research project under tested and is not yet a stable commercial product.
237
 
238
  <a href="https://arxiv.org/abs/2401.13627">Paper</a> &emsp; <a href="http://supir.xpixel.group/">Project Page</a> &emsp; <a href="https://github.com/Fanghua-Yu/SUPIR/blob/master/assets/DemoGuide.png">How to play</a> &emsp; <a href="https://huggingface.co/blog/MonsterMMORPG/supir-sota-image-upscale-better-than-magnific-ai">Local Install Guide</a>
239
  <p style="background-color: blue;">For now, only the restoring is working (the most important one). The pre-denoising and LLaVa description are failing. LLaVa is disabled.</p>
 
338
  diffusion_button = gr.Button(value="🚀 Restore", variant = "primary")
339
  with gr.Row():
340
  with gr.Column():
341
+ param_setting = gr.Radio(["Quality", "Fidelity"], interactive=True, label="Parameter setting", value="Quality")
342
  with gr.Column():
343
+ restart_button = gr.Button(value="Apply parameter setting", scale=2)
344
 
345
  with gr.Accordion("Feedback", open=True):
346
  fb_score = gr.Slider(label="Feedback Score", minimum=1, maximum=5, value=3, step=1,