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

[Bug]: API Broken in latest update

Open cbolich opened this issue 1 year ago • 12 comments

Is there an existing issue for this?

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

What happened?

First noticed that the Docs were missing and found [Bug]: /docs page isn't showing anymore? #10109

After more investigating seems like the API is broken as well. My testing is limited, but it seems that the API requests are still being received and jobs are being ran, however the responses back never happen and it times out.

Steps to reproduce the problem

Request a prompt job from the API --api flag is enabled --listen enabled

everything working fine until update

What should have happened?

response back with pictures

Commit where the problem happens

5ab7f21

What platforms do you use to access the UI ?

Windows, Linux, Other/Cloud

What browsers do you use to access the UI ?

Google Chrome, Apple Safari, Microsoft Edge

Command Line Arguments

--api
--listen
--xformers

List of extensions

control net

Console logs

Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Commit hash: 1707c56239177cfaf1d17529515fe1b02de604f4
Installing requirements
Installing imageio-ffmpeg requirement for depthmap script
Installing pyqt5 requirement for depthmap script
Launching Web UI with arguments: --xformers --api --listen --port 7861
ControlNet v1.1.125
ControlNet v1.1.125
Loading weights [e6415c4892] from F:\stable-diffusion-webui\autofork\models\Stable-diffusion\Realistic_Vision_V2.0.safetensors
Creating model from config: F:\stable-diffusion-webui\autofork\configs\v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
Applying xformers cross attention optimization.
Textual inversion embeddings loaded(0):
Model loaded in 7.8s (load weights from disk: 0.8s, create model: 0.7s, apply weights to model: 2.3s, apply half(): 0.7s, move model to device: 0.8s, load textual inversion embeddings: 2.5s).
Running on local URL:  http://0.0.0.0:7861
To create a public link, set `share=True` in `launch()`.
Startup time: 36.2s (import torch: 5.1s, import gradio: 3.9s, import ldm: 1.5s, other imports: 4.8s, list SD models: 0.1s, setup codeformer: 0.2s, load scripts: 6.4s, load SD checkpoint: 8.0s, create ui: 1.9s, gradio launch: 4.2s).
Loading model: control_sd15_normal [fef5e48e]
Loaded state_dict from [F:\stable-diffusion-webui\autofork\extensions\sd-webui-controlnet\models\control_sd15_normal.pth]
Loading config: F:\stable-diffusion-webui\autofork\extensions\sd-webui-controlnet\models\cldm_v15.yaml
ControlNet model control_sd15_normal [fef5e48e] loaded.
Loading preprocessor: normal_map
Pixel Perfect Mode Enabled.
resize_mode = ResizeMode.INNER_FIT
raw_H = 512
raw_W = 512
target_H = 768
target_W = 768
estimation = 768.0
preprocessor resolution = 768
ControlNet preprocessor location: F:\stable-diffusion-webui\autofork\extensions\sd-webui-controlnet\annotator\downloads
100%|██████████████████████████████████████████████████████████████████████████████████| 20/20 [00:25<00:00,  1.26s/it]
Total progress: 100%|██████████████████████████████████████████████████████████████████| 20/20 [00:23<00:00,  1.19s/it]
Loading model from cache: control_sd15_normal [fef5e48e]███████████████████████████████| 20/20 [00:23<00:00,  1.15s/it]
Loading preprocessor: normal_map
Pixel Perfect Mode Enabled.
resize_mode = ResizeMode.INNER_FIT
raw_H = 512
raw_W = 512
target_H = 768
target_W = 768
estimation = 768.0
preprocessor resolution = 768
100%|██████████████████████████████████████████████████████████████████████████████████| 20/20 [00:22<00:00,  1.15s/it]
Total progress: 100%|██████████████████████████████████████████████████████████████████| 20/20 [00:23<00:00,  1.17s/it]
100%|██████████████████████████████████████████████████████████████████████████████████| 50/50 [00:07<00:00,  6.94it/s]
100%|██████████████████████████████████████████████████████████████████████████████████| 50/50 [00:07<00:00,  6.89it/s]
100%|██████████████████████████████████████████████████████████████████████████████████| 50/50 [00:07<00:00,  6.83it/s]
100%|██████████████████████████████████████████████████████████████████████████████████| 50/50 [00:07<00:00,  6.96it/s]
100%|██████████████████████████████████████████████████████████████████████████████████| 50/50 [00:07<00:00,  6.87it/s]
100%|██████████████████████████████████████████████████████████████████████████████████| 50/50 [00:07<00:00,  6.93it/s]
100%|██████████████████████████████████████████████████████████████████████████████████| 50/50 [00:07<00:00,  6.88it/s]
Loading model from cache: control_sd15_normal [fef5e48e]
Loading preprocessor: normal_map
Pixel Perfect Mode Enabled.
resize_mode = ResizeMode.INNER_FIT
raw_H = 512
raw_W = 512
target_H = 768
target_W = 768
estimation = 768.0
preprocessor resolution = 768
100%|██████████████████████████████████████████████████████████████████████████████████| 20/20 [00:22<00:00,  1.14s/it]
Total progress: 370it [06:27,  1.05s/it]
100%|██████████████████████████████████████████████████████████████████████████████████| 50/50 [00:07<00:00,  6.83it/s]
100%|██████████████████████████████████████████████████████████████████████████████████| 50/50 [00:07<00:00,  6.80it/s]
100%|██████████████████████████████████████████████████████████████████████████████████| 50/50 [00:07<00:00,  6.82it/s]
Total progress: 150it [00:36,  7.00it/s]

Additional information

No response

cbolich avatar May 05 '23 22:05 cbolich

Following, as I am having this issue as well. /docs response: {"detail":"Not Found"}

reverting to a random older branch dab5002c59ce1f68deae5e6e0c03e5e2c27155db currently works,

wes-kay avatar May 06 '23 01:05 wes-kay

I have same issue

lzghades avatar May 06 '23 04:05 lzghades

Following, as I am having this issue as well. /docs response: {"detail":"Not Found"}

reverting to a random older branch dab5002c59ce1f68deae5e6e0c03e5e2c27155db currently works,

I also have this problem after updating

sayyoume avatar May 06 '23 04:05 sayyoume

does anyone have a fix?

takeraparterer avatar May 06 '23 04:05 takeraparterer

I also encountered this issue, unable to find the page when accessing docs

Emiya-wkq avatar May 06 '23 08:05 Emiya-wkq

Reverting back to this commit is not working for me...

Following, as I am having this issue as well. /docs response: {"detail":"Not Found"} reverting to a random older branch dab5002c59ce1f68deae5e6e0c03e5e2c27155db currently works,

RamishRasool14 avatar May 06 '23 09:05 RamishRasool14

Based on quick git bisect, it is this commit that has broken it: 101a18fc8466577501b57eac6a4b5d07351c9ec6. The commit before that (22bcc7be428c94e9408f589966c2040187245d81) still works.

kyberias avatar May 06 '23 09:05 kyberias

Same issue here

Fictiverse avatar May 06 '23 11:05 Fictiverse

new gradio version removed swagger /docs/ in favor of new gradio_client docs.
there is a request to bring them back. and in the meantime, there is a workaround monkey-patch available to re-introduce them, see https://github.com/gradio-app/gradio/issues/4054

vladmandic avatar May 06 '23 12:05 vladmandic

It works if you use --api --nowebui

pixelass avatar May 06 '23 14:05 pixelass

fyi, new gradio version removed swagger /docs/ in favor of new gradio_client docs. there is a request to bring them back. and in the meantime, there is a workaround monkey-patch available to re-introduce them, see gradio-app/gradio#4054

vladmandic avatar May 06 '23 14:05 vladmandic

fyi, new gradio version removed swagger /docs/ in favor of new gradio_client docs. there is a request to bring them back. and in the meantime, there is a workaround monkey-patch available to re-introduce them, see gradio-app/gradio#4054

if that is the case, downgrading the gradio version on the latest webui commit should work...

RamishRasool14 avatar May 06 '23 14:05 RamishRasool14

Based on quick git bisect, it is this commit that has broken it: 101a18f. The commit before that (22bcc7b) still works.

Thanks! To make this work on runpod again i did the following steps: git fetch --all git reset --hard 22bcc7be428c94e9408f589966c2040187245d81 pip install requirements_versions.txt

mortium91 avatar May 22 '23 20:05 mortium91

Why? This has been fully solved since then.

vladmandic avatar May 22 '23 20:05 vladmandic

Please try updating your installation to the current master (1.3.0), and if this keeps happening, open a new issue.

akx avatar May 28 '23 19:05 akx