Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -137,6 +137,40 @@ with gr.Blocks(css=css, fill_height=True) as demo:
|
|
| 137 |
controlnet_checkbox = gr.Checkbox(
|
| 138 |
label="ControlNet",
|
| 139 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 140 |
with gr.Column(visible=False) as controlnet_params:
|
| 141 |
control_strength = gr.Slider(
|
| 142 |
label="ControlNet conditioning scale",
|
|
|
|
| 137 |
controlnet_checkbox = gr.Checkbox(
|
| 138 |
label="ControlNet",
|
| 139 |
)
|
| 140 |
+
with gr.Column(visible=False) as controlnet_params:
|
| 141 |
+
control_strength = gr.Slider(
|
| 142 |
+
label="ControlNet conditioning scale",
|
| 143 |
+
minimum=0.0,
|
| 144 |
+
maximum=1.0,
|
| 145 |
+
step=0.01,
|
| 146 |
+
value=1.0,
|
| 147 |
+
)
|
| 148 |
+
control_mode = gr.Dropdown(
|
| 149 |
+
label="ControlNet mode",
|
| 150 |
+
choices=["edge_detection",
|
| 151 |
+
"pose_estimation",
|
| 152 |
+
"straight_line_detection",
|
| 153 |
+
"hed_boundary",
|
| 154 |
+
"scribbles",
|
| 155 |
+
"human pose"],
|
| 156 |
+
value="edge_detection",
|
| 157 |
+
max_choices=1
|
| 158 |
+
)
|
| 159 |
+
condition_image = gr.Image(
|
| 160 |
+
label="ControlNet condition image",
|
| 161 |
+
type="pil",
|
| 162 |
+
format="png"
|
| 163 |
+
)
|
| 164 |
+
controlnet_checkbox.change(
|
| 165 |
+
fn=lambda x: gr.Row.update(visible=x),
|
| 166 |
+
inputs=controlnet_checkbox,
|
| 167 |
+
outputs=controlnet_params
|
| 168 |
+
)
|
| 169 |
+
|
| 170 |
+
with gr.Row():
|
| 171 |
+
controlnet_checkbox = gr.Checkbox(
|
| 172 |
+
label="IPAdapter",
|
| 173 |
+
)
|
| 174 |
with gr.Column(visible=False) as controlnet_params:
|
| 175 |
control_strength = gr.Slider(
|
| 176 |
label="ControlNet conditioning scale",
|