AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
138.72k stars 26.34k forks source link

Gradio API / Base64 Issues after bumping Gradio #2839

Closed htkg closed 1 year ago

htkg commented 1 year ago

Is your feature request related to a problem? Please describe. I'm using this fork as an backend for my friends-only Telegram bot. I have several problems with it now.

1) Each time fork was updated it was a nightmare to modify payload because it's basically just a list in the data key of payload json. image

2) After bumping gradio to new version they for some reason deleted return of the base64 string in their APIs. image

Describe the solution you'd like 1) If there is a possibility, could you please make keys for the data key in the json? Nested json would be neat. For example, data = {prompt: "blablah", neg_prompt: "blablah", steps: 28 ...}

Therefore, if any change in the web interface is made all the apps that rely on this fork will work as usual because now they will have a key to rely on.

2) Is there an possibility to make it work with base64?

Thank you!

eadnams22 commented 1 year ago

From what I understand, Gradio dropped using base64 because if it wasn't being accessed on the local computer. It destroyed browser's functionality (slowed them to a crawl) with large numbers of images on screen, due to delivering every image in base64 strings.

This would be something to take up with Gradio, I think, to give the choice.

Short term, one could change the requirements.txt or requirements_versions.txt gradio version, to revert to the previous release of gradio?

ClashSAN commented 1 year ago

this is an old issue which is fixed and no longer seems relevant, if this issue is related to future issues, please refer to this previous one.