Update app.py
Browse files
app.py
CHANGED
|
@@ -255,9 +255,8 @@ with gr.Blocks(css=css, theme=theme) as app:
|
|
| 255 |
with gr.Row():
|
| 256 |
with gr.Column(scale=4, min_width=300):
|
| 257 |
input_img = gr.Image(label="Input Picture", type="filepath")
|
| 258 |
-
|
| 259 |
with gr.Column(scale=3):
|
| 260 |
-
output_text = gr.Textbox(label="
|
| 261 |
submit_btn = gr.Button(value="Generate Pompt", scale=4, variant='primary')
|
| 262 |
clear_prompt =gr.Button("Clear 🗑️",variant="primary", elem_id="clear_button")
|
| 263 |
clear_prompt.click(lambda: (None, None), None, [input_img, output_text], queue=False, show_api=False)
|
|
@@ -265,21 +264,28 @@ with gr.Blocks(css=css, theme=theme) as app:
|
|
| 265 |
submit_btn.click(feifeichat, [input_img], [output_text])
|
| 266 |
|
| 267 |
with gr.Tab("Basic Settings"):
|
| 268 |
-
with gr.
|
| 269 |
-
|
| 270 |
-
|
| 271 |
-
|
| 272 |
-
|
| 273 |
-
|
|
|
|
| 274 |
with gr.Accordion("Advanced Options", open=True):
|
| 275 |
with gr.Row():
|
| 276 |
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")
|
|
|
|
| 277 |
sampler = gr.Dropdown(value="DPM++ 2M Karras", show_label=True, label="Sampling Method:", choices=[
|
| 278 |
"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"])
|
|
|
|
| 279 |
steps = gr.Slider(show_label=True, label="Sampling Steps:", minimum=1, maximum=50, value=35, step=1)
|
|
|
|
| 280 |
cfg_scale = gr.Slider(show_label=True, label="CFG Scale:", minimum=1, maximum=20, value=7, step=1)
|
|
|
|
| 281 |
seed = gr.Number(show_label=True, label="Seed:", minimum=-1, maximum=1000000, value=-1, step=1)
|
|
|
|
| 282 |
width = gr.Slider(label="Width", minimum=512, maximum=2048, step=8, value=896, interactive=True,)
|
|
|
|
| 283 |
height = gr.Slider(label="Height", minimum=512, maximum=2048, step=8, value=1152,interactive=True,)
|
| 284 |
with gr.Column():
|
| 285 |
with gr.Row():
|
|
|
|
| 255 |
with gr.Row():
|
| 256 |
with gr.Column(scale=4, min_width=300):
|
| 257 |
input_img = gr.Image(label="Input Picture", type="filepath")
|
|
|
|
| 258 |
with gr.Column(scale=3):
|
| 259 |
+
output_text = gr.Textbox(label="Prompt", lines=2, scale=6, show_copy_button = True)
|
| 260 |
submit_btn = gr.Button(value="Generate Pompt", scale=4, variant='primary')
|
| 261 |
clear_prompt =gr.Button("Clear 🗑️",variant="primary", elem_id="clear_button")
|
| 262 |
clear_prompt.click(lambda: (None, None), None, [input_img, output_text], queue=False, show_api=False)
|
|
|
|
| 264 |
submit_btn.click(feifeichat, [input_img], [output_text])
|
| 265 |
|
| 266 |
with gr.Tab("Basic Settings"):
|
| 267 |
+
with gr.Column(scale=3):
|
| 268 |
+
with gr.Row():
|
| 269 |
+
prompt = gr.Textbox(placeholder="Enter the image description...", show_label=True, label='Image Prompt ✍️', lines=3, show_copy_button = True)
|
| 270 |
+
with gr.Row():
|
| 271 |
+
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',
|
| 272 |
+
'Juggernaut XL', 'DreamShaper XL',
|
| 273 |
+
'SDXL Niji', 'Cinemax SDXL', 'NightVision XL'])
|
| 274 |
with gr.Accordion("Advanced Options", open=True):
|
| 275 |
with gr.Row():
|
| 276 |
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")
|
| 277 |
+
with gr.Row():
|
| 278 |
sampler = gr.Dropdown(value="DPM++ 2M Karras", show_label=True, label="Sampling Method:", choices=[
|
| 279 |
"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"])
|
| 280 |
+
with gr.Row():
|
| 281 |
steps = gr.Slider(show_label=True, label="Sampling Steps:", minimum=1, maximum=50, value=35, step=1)
|
| 282 |
+
with gr.Row():
|
| 283 |
cfg_scale = gr.Slider(show_label=True, label="CFG Scale:", minimum=1, maximum=20, value=7, step=1)
|
| 284 |
+
with gr.Row():
|
| 285 |
seed = gr.Number(show_label=True, label="Seed:", minimum=-1, maximum=1000000, value=-1, step=1)
|
| 286 |
+
with gr.Row():
|
| 287 |
width = gr.Slider(label="Width", minimum=512, maximum=2048, step=8, value=896, interactive=True,)
|
| 288 |
+
with gr.Row():
|
| 289 |
height = gr.Slider(label="Height", minimum=512, maximum=2048, step=8, value=1152,interactive=True,)
|
| 290 |
with gr.Column():
|
| 291 |
with gr.Row():
|