Spaces:
Running
on
Zero
Running
on
Zero
Fabrice-TIERCELIN
commited on
Commit
•
7953a14
1
Parent(s):
7029aa9
denoise_image = gr.Image(label="Denoised image", show_label=True, type="numpy", sources=[], height=600, elem_id="image-s1")
Browse files- gradio_demo.py +2 -2
gradio_demo.py
CHANGED
@@ -527,12 +527,13 @@ with gr.Blocks(title="SUPIR") as interface:
|
|
527 |
prompt = gr.Textbox(label="Image description", info="Help the AI understand what the image represents; describe as much as possible; I advise you to write in English as other languages may not be handled", value="", placeholder="A person, walking, in a town, Summer, photorealistic", lines=3)
|
528 |
prompt_hint = gr.HTML("You can use a <a href='"'https://huggingface.co/spaces/MaziyarPanahi/llava-llama-3-8b'"'>LlaVa space</a> to auto-generate the description of your image.")
|
529 |
upscale = gr.Radio([["x1", 1], ["x2", 2], ["x3", 3], ["x4", 4], ["x5", 5], ["x6", 6], ["x7", 7], ["x8", 8]], label="Upscale factor", info="Resolution x1 to x8", value=2, interactive=True)
|
|
|
530 |
output_format = gr.Radio([["*.png", "png"], ["*.webp", "webp"], ["*.jpeg", "jpeg"], ["*.gif", "gif"], ["*.bmp", "bmp"]], label="Image format for result", info="File extention", value="png", interactive=True)
|
531 |
|
532 |
with gr.Accordion("Pre-denoising (optional)", open=False):
|
533 |
gamma_correction = gr.Slider(label="Gamma Correction", info = "lower=lighter, higher=darker", minimum=0.1, maximum=2.0, value=1.0, step=0.1)
|
534 |
denoise_button = gr.Button(value="Pre-denoise")
|
535 |
-
denoise_image = gr.Image(label="Denoised image", show_label=True, type="numpy", height=600, elem_id="image-s1")
|
536 |
denoise_information = gr.HTML(value="If present, the denoised image will be used for the restoration instead of the input image.", visible=False)
|
537 |
|
538 |
with gr.Accordion("LLaVA options", open=False, visible=False):
|
@@ -567,7 +568,6 @@ with gr.Blocks(title="SUPIR") as interface:
|
|
567 |
with gr.Column():
|
568 |
color_fix_type = gr.Radio(["None", "AdaIn", "Wavelet"], label="Color-Fix Type", info="AdaIn=Improve following a style, Wavelet=For JPEG artifacts", value="Wavelet",
|
569 |
interactive=True)
|
570 |
-
allocation = gr.Radio([["1 min", 1], ["2 min", 2], ["3 min", 3], ["4 min", 4], ["5 min", 5], ["6 min", 6], ["7 min", 7], ["8 min", 8], ["9 min", 9]], label="GPU allocation time", info="lower=May abort run, higher=Time penalty for next runs", value=6, interactive=True)
|
571 |
s_cfg = gr.Slider(label="Text Guidance Scale", info="lower=follow the image, higher=follow the prompt", minimum=1.0, maximum=15.0,
|
572 |
value=default_setting.s_cfg_Quality if torch.cuda.device_count() > 0 else 1.0, step=0.1)
|
573 |
s_stage2 = gr.Slider(label="Restoring Guidance Strength", minimum=0., maximum=1., value=1., step=0.05)
|
|
|
527 |
prompt = gr.Textbox(label="Image description", info="Help the AI understand what the image represents; describe as much as possible; I advise you to write in English as other languages may not be handled", value="", placeholder="A person, walking, in a town, Summer, photorealistic", lines=3)
|
528 |
prompt_hint = gr.HTML("You can use a <a href='"'https://huggingface.co/spaces/MaziyarPanahi/llava-llama-3-8b'"'>LlaVa space</a> to auto-generate the description of your image.")
|
529 |
upscale = gr.Radio([["x1", 1], ["x2", 2], ["x3", 3], ["x4", 4], ["x5", 5], ["x6", 6], ["x7", 7], ["x8", 8]], label="Upscale factor", info="Resolution x1 to x8", value=2, interactive=True)
|
530 |
+
allocation = gr.Radio([["1 min", 1], ["2 min", 2], ["3 min", 3], ["4 min", 4], ["5 min", 5], ["6 min", 6], ["7 min", 7], ["8 min", 8], ["9 min", 9]], label="GPU allocation time", info="lower=May abort run, higher=Time penalty for next runs", value=6, interactive=True)
|
531 |
output_format = gr.Radio([["*.png", "png"], ["*.webp", "webp"], ["*.jpeg", "jpeg"], ["*.gif", "gif"], ["*.bmp", "bmp"]], label="Image format for result", info="File extention", value="png", interactive=True)
|
532 |
|
533 |
with gr.Accordion("Pre-denoising (optional)", open=False):
|
534 |
gamma_correction = gr.Slider(label="Gamma Correction", info = "lower=lighter, higher=darker", minimum=0.1, maximum=2.0, value=1.0, step=0.1)
|
535 |
denoise_button = gr.Button(value="Pre-denoise")
|
536 |
+
denoise_image = gr.Image(label="Denoised image", show_label=True, type="numpy", sources=[], height=600, elem_id="image-s1")
|
537 |
denoise_information = gr.HTML(value="If present, the denoised image will be used for the restoration instead of the input image.", visible=False)
|
538 |
|
539 |
with gr.Accordion("LLaVA options", open=False, visible=False):
|
|
|
568 |
with gr.Column():
|
569 |
color_fix_type = gr.Radio(["None", "AdaIn", "Wavelet"], label="Color-Fix Type", info="AdaIn=Improve following a style, Wavelet=For JPEG artifacts", value="Wavelet",
|
570 |
interactive=True)
|
|
|
571 |
s_cfg = gr.Slider(label="Text Guidance Scale", info="lower=follow the image, higher=follow the prompt", minimum=1.0, maximum=15.0,
|
572 |
value=default_setting.s_cfg_Quality if torch.cuda.device_count() > 0 else 1.0, step=0.1)
|
573 |
s_stage2 = gr.Slider(label="Restoring Guidance Strength", minimum=0., maximum=1., value=1., step=0.05)
|