Spaces:
Runtime error
Runtime error
Update switch_app.py
Browse files- switch_app.py +9 -4
switch_app.py
CHANGED
|
@@ -387,25 +387,30 @@ with gr.Blocks(css=css) as Kolors:
|
|
| 387 |
)
|
| 388 |
|
| 389 |
canny_button.click(
|
|
|
|
|
|
|
|
|
|
| 390 |
fn=infer_canny,
|
| 391 |
inputs=[prompt, image, ipa_image, negative_prompt, seed, randomize_seed, guidance_scale, num_inference_steps, controlnet_conditioning_scale, control_guidance_end, strength, ip_scale],
|
| 392 |
outputs=[result, seed_used]
|
| 393 |
)
|
| 394 |
|
| 395 |
depth_button.click(
|
|
|
|
|
|
|
|
|
|
| 396 |
fn=infer_depth,
|
| 397 |
inputs=[prompt, image, ipa_image, negative_prompt, seed, randomize_seed, guidance_scale, num_inference_steps, controlnet_conditioning_scale, control_guidance_end, strength, ip_scale],
|
| 398 |
outputs=[result, seed_used]
|
| 399 |
)
|
| 400 |
|
| 401 |
pose_button.click(
|
|
|
|
|
|
|
|
|
|
| 402 |
fn=infer_pose,
|
| 403 |
inputs=[prompt, image, ipa_image, negative_prompt, seed, randomize_seed, guidance_scale, num_inference_steps, controlnet_conditioning_scale, control_guidance_end, strength, ip_scale],
|
| 404 |
outputs=[result, seed_used]
|
| 405 |
)
|
| 406 |
|
| 407 |
-
canny_button.click(switch_to_canny, outputs=[canny_button])
|
| 408 |
-
depth_button.click(switch_to_depth, outputs=[depth_button])
|
| 409 |
-
pose_button.click(switch_to_pose, outputs=[pose_button])
|
| 410 |
-
|
| 411 |
Kolors.queue().launch(debug=True, share=True)
|
|
|
|
| 387 |
)
|
| 388 |
|
| 389 |
canny_button.click(
|
| 390 |
+
fn=switch_to_canny,
|
| 391 |
+
outputs=[canny_button]
|
| 392 |
+
).then(
|
| 393 |
fn=infer_canny,
|
| 394 |
inputs=[prompt, image, ipa_image, negative_prompt, seed, randomize_seed, guidance_scale, num_inference_steps, controlnet_conditioning_scale, control_guidance_end, strength, ip_scale],
|
| 395 |
outputs=[result, seed_used]
|
| 396 |
)
|
| 397 |
|
| 398 |
depth_button.click(
|
| 399 |
+
fn=switch_to_depth,
|
| 400 |
+
outputs=[depth_button]
|
| 401 |
+
).then(
|
| 402 |
fn=infer_depth,
|
| 403 |
inputs=[prompt, image, ipa_image, negative_prompt, seed, randomize_seed, guidance_scale, num_inference_steps, controlnet_conditioning_scale, control_guidance_end, strength, ip_scale],
|
| 404 |
outputs=[result, seed_used]
|
| 405 |
)
|
| 406 |
|
| 407 |
pose_button.click(
|
| 408 |
+
fn=switch_to_pose,
|
| 409 |
+
outputs=[pose_button]
|
| 410 |
+
).then(
|
| 411 |
fn=infer_pose,
|
| 412 |
inputs=[prompt, image, ipa_image, negative_prompt, seed, randomize_seed, guidance_scale, num_inference_steps, controlnet_conditioning_scale, control_guidance_end, strength, ip_scale],
|
| 413 |
outputs=[result, seed_used]
|
| 414 |
)
|
| 415 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 416 |
Kolors.queue().launch(debug=True, share=True)
|