lichorosario commited on
Commit
3a2b24e
·
1 Parent(s): 9d39e91

feat: Update app.py with new options for image upscaling

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -251,13 +251,13 @@ with gr.Blocks(css=css) as demo:
251
  output_slider = ImageSlider(label="Before / After", type="numpy", show_download_button=False)
252
 
253
  with gr.Accordion("Advanced Options", open=False):
254
- resolution = gr.Slider(minimum=128, maximum=2048, value=1024, step=128, label="Resolution")
255
- num_inference_steps = gr.Slider(minimum=1, maximum=50, value=20, step=1, label="Number of Inference Steps")
256
- strength = gr.Slider(minimum=0, maximum=1, value=0.2, step=0.01, label="Strength")
257
- hdr = gr.Slider(minimum=0, maximum=1, value=0, step=0.1, label="HDR Effect")
258
- guidance_scale = gr.Slider(minimum=0, maximum=20, value=6, step=0.5, label="Guidance Scale")
259
- controlnet_strength = gr.Slider(minimum=0.0, maximum=2.0, value=0.75, step=0.05, label="ControlNet Strength")
260
- scheduler_name = gr.Dropdown(
261
  choices=["DDIM", "DPM++ 3M SDE Karras", "DPM++ 3M Karras"],
262
  value="DDIM",
263
  label="Scheduler"
@@ -284,7 +284,7 @@ with gr.Blocks(css=css) as demo:
284
  outputs=[output_slider]
285
  ).then(
286
  upscale_image,
287
- [generated_image, resolution, num_inference_steps, strength, hdr, guidance_scale, controlnet_strength, scheduler_name],
288
  output_slider
289
  )
290
 
 
251
  output_slider = ImageSlider(label="Before / After", type="numpy", show_download_button=False)
252
 
253
  with gr.Accordion("Advanced Options", open=False):
254
+ upscale_resolution = gr.Slider(minimum=128, maximum=2048, value=1024, step=128, label="Resolution")
255
+ upscale_num_inference_steps = gr.Slider(minimum=1, maximum=50, value=20, step=1, label="Number of Inference Steps")
256
+ upscale_strength = gr.Slider(minimum=0, maximum=1, value=0.2, step=0.01, label="Strength")
257
+ upscale_hdr = gr.Slider(minimum=0, maximum=1, value=0, step=0.1, label="HDR Effect")
258
+ upscale_guidance_scale = gr.Slider(minimum=0, maximum=20, value=6, step=0.5, label="Guidance Scale")
259
+ upscale_controlnet_strength = gr.Slider(minimum=0.0, maximum=2.0, value=0.75, step=0.05, label="ControlNet Strength")
260
+ upscale_scheduler_name = gr.Dropdown(
261
  choices=["DDIM", "DPM++ 3M SDE Karras", "DPM++ 3M Karras"],
262
  value="DDIM",
263
  label="Scheduler"
 
284
  outputs=[output_slider]
285
  ).then(
286
  upscale_image,
287
+ [generated_image, upscale_resolution, upscale_num_inference_steps, upscale_strength, upscale_hdr, upscale_guidance_scale, upscale_controlnet_strength, upscale_scheduler_name],
288
  output_slider
289
  )
290