Update app.py
Browse files
app.py
CHANGED
@@ -199,11 +199,11 @@ footer{display:none !important}
|
|
199 |
|
200 |
with gr.Blocks(css=css, theme=theme, fill_width= False) as app:
|
201 |
|
202 |
-
with gr.Tab("
|
203 |
with gr.Row():
|
204 |
-
prompt = gr.Textbox(placeholder="
|
205 |
with gr.Row():
|
206 |
-
task = gr.Radio(interactive=True, value="Stable Diffusion XL 1.0", show_label=True, label="
|
207 |
'Juggernaut XL', 'DreamShaper XL',
|
208 |
'SDXL Niji', 'Cinemax SDXL', 'NightVision XL'])
|
209 |
with gr.Row():
|
@@ -212,12 +212,12 @@ with gr.Blocks(css=css, theme=theme, fill_width= False) as app:
|
|
212 |
inputs = [prompt],
|
213 |
)
|
214 |
|
215 |
-
with gr.Tab("
|
216 |
with gr.Row():
|
217 |
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")
|
218 |
with gr.Row():
|
219 |
-
sampler = gr.Dropdown(value="DPM++
|
220 |
-
|
221 |
with gr.Row():
|
222 |
steps = gr.Slider(show_label=True, label="Sampling Steps:", minimum=1, maximum=50, value=35, step=1)
|
223 |
with gr.Row():
|
@@ -225,26 +225,26 @@ with gr.Blocks(css=css, theme=theme, fill_width= False) as app:
|
|
225 |
with gr.Row():
|
226 |
seed = gr.Number(show_label=True, label="Seed:", minimum=-1, maximum=1000000, value=-1, step=1)
|
227 |
|
228 |
-
with gr.Tab("
|
229 |
with gr.Column():
|
230 |
with gr.Row():
|
231 |
-
scale_by = gr.Number(show_label=True, label="
|
232 |
with gr.Row():
|
233 |
-
method = gr.Dropdown(show_label=True, value="ESRGAN_4x", label="
|
234 |
with gr.Column():
|
235 |
with gr.Row():
|
236 |
-
gfpgan = gr.Slider(show_label=True, label="
|
237 |
with gr.Row():
|
238 |
-
codeformer = gr.Slider(show_label=True, label="
|
239 |
|
240 |
with gr.Column():
|
241 |
-
text_button = gr.Button("
|
242 |
with gr.Column():
|
243 |
image_output = gr.Image(show_download_button=True, interactive=False, label='Результат:', elem_id='image_output', type='filepath')
|
244 |
text_button.click(flip_text, inputs=[prompt, negative_prompt, task, steps, sampler, cfg_scale, seed], outputs=image_output, concurrency_limit=48)
|
245 |
|
246 |
-
img2img_b = gr.Button("
|
247 |
-
image_i2i = gr.Image(show_label=True, label='
|
248 |
img2img_b.click(mirror, inputs=[image_output, scale_by, method, gfpgan, codeformer], outputs=image_i2i, concurrency_limit=48)
|
249 |
|
250 |
|
|
|
199 |
|
200 |
with gr.Blocks(css=css, theme=theme, fill_width= False) as app:
|
201 |
|
202 |
+
with gr.Tab("Basic Settings"):
|
203 |
with gr.Row():
|
204 |
+
prompt = gr.Textbox(placeholder="Enter the image description...", show_label=True, label='Description of the image:', lines=3)
|
205 |
with gr.Row():
|
206 |
+
task = gr.Radio(interactive=True, value="Stable Diffusion XL 1.0", show_label=True, label="Model of neural network:", choices=['Stable Diffusion XL 1.0', 'Crystal Clear XL',
|
207 |
'Juggernaut XL', 'DreamShaper XL',
|
208 |
'SDXL Niji', 'Cinemax SDXL', 'NightVision XL'])
|
209 |
with gr.Row():
|
|
|
212 |
inputs = [prompt],
|
213 |
)
|
214 |
|
215 |
+
with gr.Tab("Extended settings"):
|
216 |
with gr.Row():
|
217 |
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")
|
218 |
with gr.Row():
|
219 |
+
sampler = gr.Dropdown(value="DPM++ S", show_label=True, label="Sampling Method:", choices=[
|
220 |
+
"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"])
|
221 |
with gr.Row():
|
222 |
steps = gr.Slider(show_label=True, label="Sampling Steps:", minimum=1, maximum=50, value=35, step=1)
|
223 |
with gr.Row():
|
|
|
225 |
with gr.Row():
|
226 |
seed = gr.Number(show_label=True, label="Seed:", minimum=-1, maximum=1000000, value=-1, step=1)
|
227 |
|
228 |
+
with gr.Tab("Upscaling Settings"):
|
229 |
with gr.Column():
|
230 |
with gr.Row():
|
231 |
+
scale_by = gr.Number(show_label=True, label="How many times to increase:", minimum=1, maximum=2, value=2, step=1)
|
232 |
with gr.Row():
|
233 |
+
method = gr.Dropdown(show_label=True, value="ESRGAN_4x", label="Algorithm of enlargement", choices=["ScuNET GAN", "SwinIR 4x", "ESRGAN_4x", "R-ESRGAN 4x+", "R-ESRGAN 4x+ Anime6B"])
|
234 |
with gr.Column():
|
235 |
with gr.Row():
|
236 |
+
gfpgan = gr.Slider(show_label=True, label="Effect GFPGAN (to improve the face)", minimum=0, maximum=1, value=0, step=0.1)
|
237 |
with gr.Row():
|
238 |
+
codeformer = gr.Slider(show_label=True, label="Effect CodeFormer (to improve the face)", minimum=0, maximum=1, value=0, step=0.1)
|
239 |
|
240 |
with gr.Column():
|
241 |
+
text_button = gr.Button("Generate image", variant='primary', elem_id="generate")
|
242 |
with gr.Column():
|
243 |
image_output = gr.Image(show_download_button=True, interactive=False, label='Результат:', elem_id='image_output', type='filepath')
|
244 |
text_button.click(flip_text, inputs=[prompt, negative_prompt, task, steps, sampler, cfg_scale, seed], outputs=image_output, concurrency_limit=48)
|
245 |
|
246 |
+
img2img_b = gr.Button("Increase the image", variant='secondary')
|
247 |
+
image_i2i = gr.Image(show_label=True, label='Increased image:')
|
248 |
img2img_b.click(mirror, inputs=[image_output, scale_by, method, gfpgan, codeformer], outputs=image_i2i, concurrency_limit=48)
|
249 |
|
250 |
|