Spaces:
Running
on
Zero
Running
on
Zero
Fabrice-TIERCELIN
commited on
Commit
•
856f850
1
Parent(s):
5353cec
More lines for descriptions
Browse files- gradio_demo.py +8 -6
gradio_demo.py
CHANGED
@@ -29,7 +29,7 @@ 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=
|
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)
|
@@ -264,7 +264,7 @@ with gr.Blocks(title='SUPIR') as interface:
|
|
264 |
with gr.Column():
|
265 |
gr.Markdown("<center>Pre-denoising Output</center>")
|
266 |
denoise_image = gr.Image(type="numpy", elem_id="image-s1", height=400, width=400)
|
267 |
-
prompt = gr.Textbox(label="Image description", value="", placeholder="A person, walking, in a town, Summer, photorealistic")
|
268 |
|
269 |
with gr.Accordion("Pre-denoising options", open=False):
|
270 |
gamma_correction = gr.Slider(label="Gamma Correction", minimum=0.1, maximum=2.0, value=1.0, step=0.1)
|
@@ -272,7 +272,7 @@ with gr.Blocks(title='SUPIR') as interface:
|
|
272 |
with gr.Accordion("LLaVA options", open=False):
|
273 |
temperature = gr.Slider(label="Temperature", info = "lower=Always similar, higher=More creative", minimum=0., maximum=1.0, value=0.2, step=0.1)
|
274 |
top_p = gr.Slider(label="Top P", info = "Percent of tokens shortlisted", minimum=0., maximum=1.0, value=0.7, step=0.1)
|
275 |
-
qs = gr.Textbox(label="Question", info="Describe the image and its style in a very detailed manner
|
276 |
|
277 |
with gr.Accordion("Restoring options", open=False):
|
278 |
num_samples = gr.Slider(label="Num Samples", info="Number of generated results; I discourage to increase because the process is limited to 3 min", minimum=1, maximum=4 if not args.use_image_slider else 1
|
@@ -291,13 +291,15 @@ with gr.Blocks(title='SUPIR') as interface:
|
|
291 |
value='Cinematic, High Contrast, highly detailed, taken using a Canon EOS R '
|
292 |
'camera, hyper detailed photo - realistic maximum detail, 32k, Color '
|
293 |
'Grading, ultra HD, extreme meticulous detailing, skin pore detailing, '
|
294 |
-
'hyper sharpness, perfect without deformations.'
|
|
|
295 |
n_prompt = gr.Textbox(label="Default Negative Prompt",
|
296 |
info="List what the image does NOT represent",
|
297 |
value='painting, oil painting, illustration, drawing, art, sketch, anime, '
|
298 |
'cartoon, CG Style, 3D render, unreal engine, blurring, bokeh, ugly, dirty, messy, '
|
299 |
'worst quality, low quality, frames, watermark, signature, jpeg artifacts, '
|
300 |
-
'deformed, lowres, over-smooth'
|
|
|
301 |
with gr.Row():
|
302 |
with gr.Column():
|
303 |
linear_CFG = gr.Checkbox(label="Linear CFG", value=True)
|
@@ -331,7 +333,7 @@ with gr.Blocks(title='SUPIR') as interface:
|
|
331 |
with gr.Column():
|
332 |
denoise_button = gr.Button(value="Pre-denoise (KO)")
|
333 |
with gr.Column():
|
334 |
-
llave_button = gr.Button(value="
|
335 |
with gr.Column():
|
336 |
diffusion_button = gr.Button(value="🚀 Restore", variant = "primary")
|
337 |
with gr.Row():
|
|
|
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)
|
|
|
264 |
with gr.Column():
|
265 |
gr.Markdown("<center>Pre-denoising Output</center>")
|
266 |
denoise_image = gr.Image(type="numpy", elem_id="image-s1", height=400, width=400)
|
267 |
+
prompt = gr.Textbox(label="Image description", value="", placeholder="A person, walking, in a town, Summer, photorealistic", lines=3)
|
268 |
|
269 |
with gr.Accordion("Pre-denoising options", open=False):
|
270 |
gamma_correction = gr.Slider(label="Gamma Correction", minimum=0.1, maximum=2.0, value=1.0, step=0.1)
|
|
|
272 |
with gr.Accordion("LLaVA options", open=False):
|
273 |
temperature = gr.Slider(label="Temperature", info = "lower=Always similar, higher=More creative", minimum=0., maximum=1.0, value=0.2, step=0.1)
|
274 |
top_p = gr.Slider(label="Top P", info = "Percent of tokens shortlisted", minimum=0., maximum=1.0, value=0.7, step=0.1)
|
275 |
+
qs = gr.Textbox(label="Question", info="Ask LLaVa what description you want", value="Describe the image and its style in a very detailed manner. The image is a realistic photography, not an art painting.", lines=3)
|
276 |
|
277 |
with gr.Accordion("Restoring options", open=False):
|
278 |
num_samples = gr.Slider(label="Num Samples", info="Number of generated results; I discourage to increase because the process is limited to 3 min", minimum=1, maximum=4 if not args.use_image_slider else 1
|
|
|
291 |
value='Cinematic, High Contrast, highly detailed, taken using a Canon EOS R '
|
292 |
'camera, hyper detailed photo - realistic maximum detail, 32k, Color '
|
293 |
'Grading, ultra HD, extreme meticulous detailing, skin pore detailing, '
|
294 |
+
'hyper sharpness, perfect without deformations.',
|
295 |
+
lines=3)
|
296 |
n_prompt = gr.Textbox(label="Default Negative Prompt",
|
297 |
info="List what the image does NOT represent",
|
298 |
value='painting, oil painting, illustration, drawing, art, sketch, anime, '
|
299 |
'cartoon, CG Style, 3D render, unreal engine, blurring, bokeh, ugly, dirty, messy, '
|
300 |
'worst quality, low quality, frames, watermark, signature, jpeg artifacts, '
|
301 |
+
'deformed, lowres, over-smooth',
|
302 |
+
lines=3)
|
303 |
with gr.Row():
|
304 |
with gr.Column():
|
305 |
linear_CFG = gr.Checkbox(label="Linear CFG", value=True)
|
|
|
333 |
with gr.Column():
|
334 |
denoise_button = gr.Button(value="Pre-denoise (KO)")
|
335 |
with gr.Column():
|
336 |
+
llave_button = gr.Button(value="Generate description by LlaVa (KO)")
|
337 |
with gr.Column():
|
338 |
diffusion_button = gr.Button(value="🚀 Restore", variant = "primary")
|
339 |
with gr.Row():
|