AUTOMATIC1111/stable-diffusion-webui

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

dellis23 opened this issue ยท 4 comments

Is there an existing issue for this?

  • 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.

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

gradio-app/gradio#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.

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

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

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?

Mikubill/sd-webui-controlnet#1314