Update app.py
Browse files
app.py
CHANGED
|
@@ -184,12 +184,12 @@ with gr.Blocks(css=css) as demo:
|
|
| 184 |
label="LoRA Strength"
|
| 185 |
)
|
| 186 |
|
| 187 |
-
# Показывать/скрывать секцию LoRA в зависимости от модели
|
| 188 |
-
model_id.change(
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
)
|
| 193 |
|
| 194 |
with gr.Group():
|
| 195 |
title = gr.Markdown(" ### ControlNet section")
|
|
@@ -300,55 +300,31 @@ with gr.Blocks(css=css) as demo:
|
|
| 300 |
|
| 301 |
gr.Examples(examples=examples, inputs=[prompt])
|
| 302 |
|
| 303 |
-
# gr.on(
|
| 304 |
-
# triggers=[run_button.click, prompt.submit],
|
| 305 |
-
# fn=infer,
|
| 306 |
-
# inputs=[
|
| 307 |
-
# model_id,
|
| 308 |
-
# prompt,
|
| 309 |
-
# negative_prompt,
|
| 310 |
-
# seed,
|
| 311 |
-
# randomize_seed,
|
| 312 |
-
# width,
|
| 313 |
-
# height,
|
| 314 |
-
# guidance_scale,
|
| 315 |
-
# num_inference_steps,
|
| 316 |
-
# lora_scale,
|
| 317 |
-
# use_controlnet,
|
| 318 |
-
# controlnet_image,
|
| 319 |
-
# controlnet_strength,
|
| 320 |
-
# controlnet_mode,
|
| 321 |
-
# use_ip_adapter,
|
| 322 |
-
# ip_adapter_image,
|
| 323 |
-
# ip_adapter_scale,
|
| 324 |
-
# ],
|
| 325 |
-
# outputs=[result, seed],
|
| 326 |
-
# )
|
| 327 |
-
|
| 328 |
gr.on(
|
| 329 |
triggers=[run_button.click, prompt.submit],
|
| 330 |
fn=infer,
|
| 331 |
inputs=[
|
| 332 |
model_id,
|
| 333 |
-
|
| 334 |
-
|
| 335 |
-
|
| 336 |
-
|
| 337 |
-
|
| 338 |
-
|
| 339 |
-
|
| 340 |
-
|
| 341 |
-
|
| 342 |
-
|
| 343 |
-
|
| 344 |
-
|
| 345 |
-
|
| 346 |
-
|
| 347 |
-
|
| 348 |
-
|
| 349 |
],
|
| 350 |
outputs=[result, seed],
|
| 351 |
)
|
| 352 |
|
|
|
|
| 353 |
if __name__ == "__main__":
|
| 354 |
demo.launch()
|
|
|
|
| 184 |
label="LoRA Strength"
|
| 185 |
)
|
| 186 |
|
| 187 |
+
# # Показывать/скрывать секцию LoRA в зависимости от модели
|
| 188 |
+
# model_id.change(
|
| 189 |
+
# fn=lambda x: gr.update(visible=is_lora(x)),
|
| 190 |
+
# inputs=model_id,
|
| 191 |
+
# outputs=lora_section
|
| 192 |
+
# )
|
| 193 |
|
| 194 |
with gr.Group():
|
| 195 |
title = gr.Markdown(" ### ControlNet section")
|
|
|
|
| 300 |
|
| 301 |
gr.Examples(examples=examples, inputs=[prompt])
|
| 302 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 303 |
gr.on(
|
| 304 |
triggers=[run_button.click, prompt.submit],
|
| 305 |
fn=infer,
|
| 306 |
inputs=[
|
| 307 |
model_id,
|
| 308 |
+
prompt,
|
| 309 |
+
negative_prompt,
|
| 310 |
+
seed,
|
| 311 |
+
randomize_seed,
|
| 312 |
+
width,
|
| 313 |
+
height,
|
| 314 |
+
guidance_scale,
|
| 315 |
+
num_inference_steps,
|
| 316 |
+
lora_scale,
|
| 317 |
+
use_controlnet,
|
| 318 |
+
controlnet_image,
|
| 319 |
+
controlnet_strength,
|
| 320 |
+
controlnet_mode,
|
| 321 |
+
use_ip_adapter,
|
| 322 |
+
ip_adapter_image,
|
| 323 |
+
ip_adapter_scale,
|
| 324 |
],
|
| 325 |
outputs=[result, seed],
|
| 326 |
)
|
| 327 |
|
| 328 |
+
|
| 329 |
if __name__ == "__main__":
|
| 330 |
demo.launch()
|