Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -13,20 +13,20 @@ def upscale_image(prompt,negative_prompt, rows=3,seed=0, image=None,enable_custo
|
|
13 |
|
14 |
|
15 |
image_input = gr.Image(label="Input Image")
|
16 |
-
prompt_input = gr.Textbox(
|
17 |
-
negative_prompt_input = gr.Textbox(
|
18 |
-
seed_input = gr.Number(
|
19 |
-
row_input = gr.Number(
|
20 |
-
xformers_input = gr.Checkbox(
|
21 |
-
enable_custom_sliders = gr.Checkbox(
|
22 |
-
cpu_offload_input = gr.Checkbox(
|
23 |
-
attention_slicing_input = gr.Checkbox(
|
24 |
output_image = gr.Image(label="Output Image",type='pil')
|
25 |
guidance = gr.Slider(2, 15, 7, step=1, label='Guidance Scale: How much the AI influences the Upscaling.')
|
26 |
iterations = gr.Slider(10, 75, 50, step=1, label='Number of Iterations')
|
27 |
#save_png_button, save_png_halfsize_button ; I don't know how to implement them
|
28 |
-
save_png_button = gr.Button(
|
29 |
-
save_png_halfsize_button = gr.Button(
|
30 |
|
31 |
gr.Interface(fn=upscale_image,
|
32 |
inputs=[prompt_input,negative_prompt_input,row_input,
|
|
|
13 |
|
14 |
|
15 |
image_input = gr.Image(label="Input Image")
|
16 |
+
prompt_input = gr.Textbox(value="8k, photography, cgi, unreal engine, octane render, best quality",label="Prompt")
|
17 |
+
negative_prompt_input = gr.Textbox(value="jpeg artifacts, lowres, bad quality",label="Negative prompt")
|
18 |
+
seed_input = gr.Number(value=-1, label="Seed")
|
19 |
+
row_input = gr.Number(value=1, label="Tile grid dimension amount (number of rows and columns) - v x v")
|
20 |
+
xformers_input = gr.Checkbox(value=True,label="Enable Xformers memory efficient attention")
|
21 |
+
enable_custom_sliders = gr.Checkbox(value=False,label="(NOT RECOMMENDED) Click to enable the sliders below; if unchecked, it will ignore them and use the default settings")
|
22 |
+
cpu_offload_input = gr.Checkbox(value=True,label="Enable sequential CPU offload")
|
23 |
+
attention_slicing_input = gr.Checkbox(value=True,label="Enable attention slicing")
|
24 |
output_image = gr.Image(label="Output Image",type='pil')
|
25 |
guidance = gr.Slider(2, 15, 7, step=1, label='Guidance Scale: How much the AI influences the Upscaling.')
|
26 |
iterations = gr.Slider(10, 75, 50, step=1, label='Number of Iterations')
|
27 |
#save_png_button, save_png_halfsize_button ; I don't know how to implement them
|
28 |
+
save_png_button = gr.Button("Save as a PNG image") # Added this button with the save_png function
|
29 |
+
save_png_halfsize_button = gr.Button("Save as a PNG image (half size)") # Added this button with the save_png_halfsize function
|
30 |
|
31 |
gr.Interface(fn=upscale_image,
|
32 |
inputs=[prompt_input,negative_prompt_input,row_input,
|