Spaces:
Running
on
Zero
Running
on
Zero
Upload app.py
Browse files
app.py
CHANGED
@@ -205,6 +205,7 @@ with gr.Blocks(fill_width=True, elem_id="container", css=css, delete_cache=(60,
|
|
205 |
lora_download = gr.Button("Get and set LoRA and apply to prompt")
|
206 |
|
207 |
with gr.Tab("ControlNet / Img2img / Inpaint"):
|
|
|
208 |
with gr.Row():
|
209 |
#image_control = gr.Image(label="Image ControlNet / Inpaint / Img2img", type="filepath", height=384, sources=["upload", "clipboard", "webcam"], show_share_button=False)
|
210 |
image_control = gr.ImageEditor(label="Image ControlNet / Inpaint / Img2img", type="filepath", sources=["upload", "clipboard", "webcam"], image_mode='RGB',
|
@@ -359,7 +360,9 @@ with gr.Blocks(fill_width=True, elem_id="container", css=css, delete_cache=(60,
|
|
359 |
cache_examples=False,
|
360 |
)
|
361 |
|
362 |
-
model_name.change(update_task_options, [model_name, task], [task], queue=False, show_api=False)
|
|
|
|
|
363 |
task.change(change_preprocessor_choices, [task], [preprocessor_name], queue=False, show_api=False)
|
364 |
active_textual_inversion.change(update_textual_inversion, [active_textual_inversion, model_name], [use_textual_inversion], queue=False, show_api=False)
|
365 |
model_name.change(update_textual_inversion, [active_textual_inversion, model_name], [use_textual_inversion], queue=False, show_api=False)
|
|
|
205 |
lora_download = gr.Button("Get and set LoRA and apply to prompt")
|
206 |
|
207 |
with gr.Tab("ControlNet / Img2img / Inpaint"):
|
208 |
+
task_sel = gr.Radio(label="Task Selector", choices=SDXL_TASK, value=TASK_MODEL_LIST[0])
|
209 |
with gr.Row():
|
210 |
#image_control = gr.Image(label="Image ControlNet / Inpaint / Img2img", type="filepath", height=384, sources=["upload", "clipboard", "webcam"], show_share_button=False)
|
211 |
image_control = gr.ImageEditor(label="Image ControlNet / Inpaint / Img2img", type="filepath", sources=["upload", "clipboard", "webcam"], image_mode='RGB',
|
|
|
360 |
cache_examples=False,
|
361 |
)
|
362 |
|
363 |
+
model_name.change(update_task_options, [model_name, task], [task], queue=False, show_api=False)\
|
364 |
+
.success(update_task_options, [model_name, task_sel], [task_sel], queue=False, show_api=False)
|
365 |
+
task_sel.change(lambda x: x, [task_sel], [task], queue=False, show_api=False)
|
366 |
task.change(change_preprocessor_choices, [task], [preprocessor_name], queue=False, show_api=False)
|
367 |
active_textual_inversion.change(update_textual_inversion, [active_textual_inversion, model_name], [use_textual_inversion], queue=False, show_api=False)
|
368 |
model_name.change(update_textual_inversion, [active_textual_inversion, model_name], [use_textual_inversion], queue=False, show_api=False)
|