Skip to content

Instantly share code, notes, and snippets.

@opparco
Created November 15, 2022 05:18
Show Gist options
  • Save opparco/2538bff8a08e5dd9b1d1529bb8a423ab to your computer and use it in GitHub Desktop.
Save opparco/2538bff8a08e5dd9b1d1529bb8a423ab to your computer and use it in GitHub Desktop.
use gradio api
diff --git a/modules/ui.py b/modules/ui.py
index 5dce7f3..3a5cc55 100644
--- a/modules/ui.py
+++ b/modules/ui.py
@@ -775,7 +775,7 @@ def create_ui(wrap_gradio_gpu_call):
show_progress=False,
)
- txt2img_prompt.submit(**txt2img_args)
+ txt2img_prompt.submit(api_name='txt2img', **txt2img_args)
submit.click(**txt2img_args)
txt_prompt_img.change(
@@ -989,7 +989,7 @@ def create_ui(wrap_gradio_gpu_call):
show_progress=False,
)
- img2img_prompt.submit(**img2img_args)
+ img2img_prompt.submit(api_name='img2img', **img2img_args)
submit.click(**img2img_args)
img2img_interrogate.click(
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment