Update app.py
Browse files
app.py
CHANGED
|
@@ -129,7 +129,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 129 |
|
| 130 |
result = gr.Image(label="Result", show_label=False)
|
| 131 |
|
| 132 |
-
with gr.
|
| 133 |
title = gr.Markdown(" ### Lora section")
|
| 134 |
with gr.Row():
|
| 135 |
lora_scale = gr.Slider(
|
|
@@ -142,12 +142,12 @@ with gr.Blocks(css=css) as demo:
|
|
| 142 |
|
| 143 |
# Показывать/скрывать секцию IP-adapter в зависимости от модели
|
| 144 |
model_id.change(
|
| 145 |
-
fn=lambda x: gr.update(visible=is_lora(x)),
|
| 146 |
inputs=model_id,
|
| 147 |
outputs=lora_section
|
| 148 |
)
|
| 149 |
|
| 150 |
-
with gr.
|
| 151 |
title = gr.Markdown(" ### ControlNet section")
|
| 152 |
with gr.Column():
|
| 153 |
use_controlnet = gr.Checkbox(label="Use ControlNet", value=False)
|
|
@@ -177,7 +177,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 177 |
outputs=controlnet_section
|
| 178 |
)
|
| 179 |
|
| 180 |
-
with gr.
|
| 181 |
title = gr.Markdown(" ### IP-adapter section")
|
| 182 |
with gr.Column():
|
| 183 |
use_ip_adapter = gr.Checkbox(label="Use IP-adapter", value=False)
|
|
|
|
| 129 |
|
| 130 |
result = gr.Image(label="Result", show_label=False)
|
| 131 |
|
| 132 |
+
with gr.Group(visible=is_lora(model_id)) as lora_section:
|
| 133 |
title = gr.Markdown(" ### Lora section")
|
| 134 |
with gr.Row():
|
| 135 |
lora_scale = gr.Slider(
|
|
|
|
| 142 |
|
| 143 |
# Показывать/скрывать секцию IP-adapter в зависимости от модели
|
| 144 |
model_id.change(
|
| 145 |
+
fn=lambda x: print(x), gr.update(visible=is_lora(x)),
|
| 146 |
inputs=model_id,
|
| 147 |
outputs=lora_section
|
| 148 |
)
|
| 149 |
|
| 150 |
+
with gr.Group():
|
| 151 |
title = gr.Markdown(" ### ControlNet section")
|
| 152 |
with gr.Column():
|
| 153 |
use_controlnet = gr.Checkbox(label="Use ControlNet", value=False)
|
|
|
|
| 177 |
outputs=controlnet_section
|
| 178 |
)
|
| 179 |
|
| 180 |
+
with gr.Group():
|
| 181 |
title = gr.Markdown(" ### IP-adapter section")
|
| 182 |
with gr.Column():
|
| 183 |
use_ip_adapter = gr.Checkbox(label="Use IP-adapter", value=False)
|