Update app.py
Browse files
app.py
CHANGED
@@ -184,17 +184,7 @@ css = """
|
|
184 |
footer{display:none !important}
|
185 |
#generate {
|
186 |
width: 100%;
|
187 |
-
background: #e253dd !important;
|
188 |
-
border: none;
|
189 |
-
border-radius: 50px;
|
190 |
-
outline: none !important;
|
191 |
-
color: white;
|
192 |
}
|
193 |
-
#generate:hover {
|
194 |
-
background: #de6bda !important;
|
195 |
-
outline: none !important;
|
196 |
-
color: #fff;
|
197 |
-
}
|
198 |
#image_output {
|
199 |
height: 100% !important;
|
200 |
}
|
@@ -214,8 +204,8 @@ with gr.Blocks(css=css, theme=theme) as app:
|
|
214 |
with gr.Row():
|
215 |
negative_prompt = gr.Textbox(placeholder="Negative Prompt", show_label=True, label='Negative Prompt:', lines=3, value="[deformed | disfigured], poorly drawn, [bad : wrong] anatomy, [extra | missing | floating | disconnected] limb, (mutated hands and fingers), blurry")
|
216 |
with gr.Row():
|
217 |
-
sampler = gr.Dropdown(value="DPM++
|
218 |
-
"
|
219 |
with gr.Row():
|
220 |
steps = gr.Slider(show_label=True, label="Sampling Steps:", minimum=1, maximum=50, value=35, step=1)
|
221 |
with gr.Row():
|
@@ -235,14 +225,14 @@ with gr.Blocks(css=css, theme=theme) as app:
|
|
235 |
method = gr.Dropdown(show_label=True, value="ESRGAN_4x", label="Increasing algorithm", choices=["ScuNET GAN", "SwinIR 4x", "ESRGAN_4x", "R-ESRGAN 4x+", "R-ESRGAN 4x+ Anime6B"])
|
236 |
with gr.Column():
|
237 |
with gr.Row():
|
238 |
-
gfpgan = gr.Slider(show_label=True, label="Effect GFPGAN (
|
239 |
with gr.Row():
|
240 |
-
codeformer = gr.Slider(show_label=True, label="Effect CodeFormer (
|
241 |
|
242 |
with gr.Column():
|
243 |
-
text_button = gr.Button("Generate image", variant=
|
244 |
with gr.Column():
|
245 |
-
image_output = gr.Image(show_download_button=True, interactive=False, label='
|
246 |
text_button.click(flip_text, inputs=[prompt, negative_prompt, task, steps, sampler, cfg_scale, seed, width, height], outputs=image_output, concurrency_limit=48)
|
247 |
|
248 |
img2img_b = gr.Button("Increase the image", variant='secondary')
|
|
|
184 |
footer{display:none !important}
|
185 |
#generate {
|
186 |
width: 100%;
|
|
|
|
|
|
|
|
|
|
|
187 |
}
|
|
|
|
|
|
|
|
|
|
|
188 |
#image_output {
|
189 |
height: 100% !important;
|
190 |
}
|
|
|
204 |
with gr.Row():
|
205 |
negative_prompt = gr.Textbox(placeholder="Negative Prompt", show_label=True, label='Negative Prompt:', lines=3, value="[deformed | disfigured], poorly drawn, [bad : wrong] anatomy, [extra | missing | floating | disconnected] limb, (mutated hands and fingers), blurry")
|
206 |
with gr.Row():
|
207 |
+
sampler = gr.Dropdown(value="DPM++ 2M Karras", show_label=True, label="Sampling Method:", choices=[
|
208 |
+
"DPM++ 2M Karras", "DPM++ 2S a Karras", "DPM2 a Karras", "DPM2 Karras", "DPM++ SDE Karras", "DEIS", "LMS", "DPM Adaptive", "DPM++ 2M", "DPM2 Ancestral", "DPM++ S", "DPM++ SDE", "DDPM", "DPM Fast", "dpmpp_2s_ancestral", "Euler", "Euler CFG PP", "Euler a", "Euler Ancestral", "Euler+beta", "Heun", "Heun PP2", "DDIM", "LMS Karras", "PLMS", "UniPC", "UniPC BH2"])
|
209 |
with gr.Row():
|
210 |
steps = gr.Slider(show_label=True, label="Sampling Steps:", minimum=1, maximum=50, value=35, step=1)
|
211 |
with gr.Row():
|
|
|
225 |
method = gr.Dropdown(show_label=True, value="ESRGAN_4x", label="Increasing algorithm", choices=["ScuNET GAN", "SwinIR 4x", "ESRGAN_4x", "R-ESRGAN 4x+", "R-ESRGAN 4x+ Anime6B"])
|
226 |
with gr.Column():
|
227 |
with gr.Row():
|
228 |
+
gfpgan = gr.Slider(show_label=True, label="Effect GFPGAN (For facial improvement)", minimum=0, maximum=1, value=0, step=0.1)
|
229 |
with gr.Row():
|
230 |
+
codeformer = gr.Slider(show_label=True, label="Effect CodeFormer (Improve the face)", minimum=0, maximum=1, value=0, step=0.1)
|
231 |
|
232 |
with gr.Column():
|
233 |
+
text_button = gr.Button("Generate image", variant="primary", interactive=True, elem_id="generate")
|
234 |
with gr.Column():
|
235 |
+
image_output = gr.Image(show_download_button=True, interactive=False, label='Result:', elem_id='image_output', type='filepath')
|
236 |
text_button.click(flip_text, inputs=[prompt, negative_prompt, task, steps, sampler, cfg_scale, seed, width, height], outputs=image_output, concurrency_limit=48)
|
237 |
|
238 |
img2img_b = gr.Button("Increase the image", variant='secondary')
|