stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

[Feature Request]: add a way to show the payload used for the current web request

Open dellis23 opened this issue 2 years ago • 3 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues and checked the recent builds/commits

What would your feature do ?

It would be nice to be able to see exactly what payload I could use to recreate a request made with the web UI using the other APIs (e.g. curl or Python).

Proposed workflow

  1. Go to the web ui
  2. Create a txt2img, img2img, or other image generation request 3a. Either run the request by clicking "generate" and then click a small "show API payload" to show the recently used payload 3b. Or: show a button that exposes what payload would be used if the user were to click the "generate" button

Additional information

From looking at the network request logs, I'm guessing this isn't super straightforward. It doesn't seem like the webui uses the same API as the API that's exposed to users. So perhaps something would need to be done about that.

dellis23 avatar Mar 29 '23 01:03 dellis23

Just an FYI, Gradio is working on a Python client that's supposed to allow you to use any Gradio app as an API

https://github.com/gradio-app/gradio/pull/3300

Though, I don't know if webui can be supported through this feature yet. Nor is there a way to convert from frontend requests to API fetch statements.

space-nuko avatar Mar 29 '23 06:03 space-nuko

any update on this feature request? this feature is really helpful!

speaknowpotato avatar Jun 15 '23 21:06 speaknowpotato

Feature implemented as an extension https://github.com/huchenlei/sd-webui-api-payload-display. You can go and try it out. @speaknowpotato

huchenlei avatar Jun 19 '23 04:06 huchenlei

Feature implemented as an extension https://github.com/huchenlei/sd-webui-api-payload-display. You can go and try it out. @speaknowpotato

Does this help with this feature idea @huchenlei?

https://github.com/Mikubill/sd-webui-controlnet/discussions/1314

Chubbly avatar Jul 04 '23 02:07 Chubbly