sand74 commited on
Commit
074cdd7
·
verified ·
1 Parent(s): 05cd1e2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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.Blocks(visible=is_lora(model_id)) as lora_section:
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.Blocks():
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.Blocks("IP-adapter section"):
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)