Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing /docs endpoint in newer gradio versions #10168

Merged
merged 2 commits into from
May 8, 2023

Conversation

mouhao
Copy link
Contributor

@mouhao mouhao commented May 7, 2023

Fix missing /docs endpoint in newer gradio versions
Newer versions of gradio (>=3.27.0) have removed the /docs endpoint by default. This commit adds it back to enable accessing the API documentation.

This pull request fixes an issue where newer gradio versions (>=3.27.0) no longer expose the /docs endpoint to access the API documentation by default.

To resolve this, I have:

Update webui.py
This enables users of the stable-diffusion-webui to access the /docs endpoint again to view the API documentation in newer gradio versions.

Environment this was tested in

OS: Windows 10
Browser: Chrome
Graphics card: NVIDIA GTX 3080 10GB
image
image

mouhao added 2 commits May 7, 2023 20:54
Fix missing /docs endpoint in newer gradio versions
Newer versions of gradio (>=3.27.1) have removed the /docs endpoint by default. This commit adds it back to enable accessing the API documentation.
@mouhao mouhao requested a review from AUTOMATIC1111 as a code owner May 7, 2023 13:11
@1lint
Copy link

1lint commented May 7, 2023

Hi I see you used my monkey patch from gradio-app/gradio#4054
But there is a deeper issue with the api calls failing in silent unexpected ways. I put in a PR at #10177 to address that as well

@wolfpixels
Copy link

+1 want to use the api, pls fix!

@mouhao
Copy link
Contributor Author

mouhao commented May 8, 2023

Hi I see you used my monkey patch from gradio-app/gradio#4054 But there is a deeper issue with the api calls failing in silent unexpected ways. I put in a PR at #10177 to address that as well

Yes, I have consulted your instructions on the gradio-app/gradio#4054. I apologize for not mentioning your instructions and greatly appreciate your solution.

@AUTOMATIC1111 AUTOMATIC1111 changed the base branch from master to dev May 8, 2023 04:46
@AUTOMATIC1111 AUTOMATIC1111 merged commit 064eda9 into AUTOMATIC1111:dev May 8, 2023
@wzgrx
Copy link
Contributor

wzgrx commented May 9, 2023

The preview function seems to be broken, the preview image is cracked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants