huchenlei / sd-webui-openpose-editor

Openpose editor for ControlNet. Full hand/face support.
MIT License
664 stars 66 forks source link

[Bug]: Invalid request url: /openpose_editor_index?theme=dark #71

Closed WangGosh closed 7 months ago

WangGosh commented 7 months ago

Is there an existing issue for this?

What happened?

I deployed a WebUI on an Alibaba Cloud DSW server. However, when I open the editor, it displays a blank window and shows an invalid address. I'm unsure how to modify this address or which file to modify.

Steps to reproduce the problem

7c4eefc76921c7538e96d7a4684f9a8

What should have happened?

image

Commit where the problem happens

webui: controlnet: openpose-editor:

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

--theme=dark

Console logs

/mnt/workspace/stable-diffusion-webui
Python 3.10.13 (main, Sep 11 2023, 13:44:35) [GCC 11.2.0]
Version: v1.9.0
Commit hash: adadb4e3c7382bf3e4f7519126cd6c70f4f8557b
loading WD14-tagger reqs from /mnt/workspace/stable-diffusion-webui/extensions/stable-diffusion-webui-wd14-tagger/requirements.txt
Checking WD14-tagger requirements.
Launching Web UI with arguments: --xformers --theme=dark
[2024-04-24 18:13:31,183] [INFO] [real_accelerator.py:161:get_accelerator] Setting ds_accelerator to cuda (auto detect)
2024-04-24 18:13:31.648939: I tensorflow/core/util/port.cc:113] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
2024-04-24 18:13:31.687591: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 AVX512F AVX512_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2024-04-24 18:13:32.413393: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
Tag Autocomplete: Could not locate model-keyword extension, Lora trigger word completion will be limited to those added through the extra networks menu.
[-] ADetailer: Failed to load model 'face_yolov8n.pt' from huggingface
[-] ADetailer initialized. version: 24.4.2, num models: 4
ControlNet preprocessor location: /mnt/workspace/stable-diffusion-webui/extensions/sd-webui-controlnet/annotator/downloads
2024-04-24 18:13:47,033 - ControlNet - INFO - ControlNet v1.1.445
2024-04-24 18:13:47,243 - ControlNet - INFO - ControlNet v1.1.445
sd-webui-prompt-all-in-one background API service started successfully.
== WD14 tagger /gpu:0, uname_result(system='Linux', node='dsw-362506-5885b645c4-xmwqx', release='4.19.24-7.34.cbp.al7.x86_64', version='#1 SMP Tue Jun 20 06:15:49 UTC 2023', machine='x86_64') ==
Loading weights [cdf971b4a0] from /mnt/workspace/stable-diffusion-webui/models/Stable-diffusion/AWPainting_v1.4.safetensors
2024-04-24 18:13:48,018 - ControlNet - INFO - ControlNet UI callback registered.
Running on local URL:  http://127.0.0.1:7860
Creating model from config: /mnt/workspace/stable-diffusion-webui/configs/v1-inference.yaml
Applying attention optimization: xformers... done.
Model loaded in 2.4s (load weights from disk: 1.1s, create model: 0.3s, apply weights to model: 0.4s, load textual inversion embeddings: 0.3s, calculate empty prompt: 0.2s).

To create a public link, set `share=True` in `launch()`.
🤯 LobeTheme: Initializing...
Startup time: 29.5s (prepare environment: 6.8s, import torch: 5.5s, import gradio: 1.0s, setup paths: 0.6s, other imports: 0.4s, load scripts: 11.9s, create ui: 1.0s, gradio launch: 2.2s).
2024-04-24 18:16:59,702 - ControlNet - INFO - Preview Resolution = 512
2024-04-24 18:30:28,199 - ControlNet - INFO - Preview Resolution = 512

Browser logs

I don't know where it is

Additional information

No response

huchenlei commented 7 months ago

Hmmm this should really not happen as if local installation is not detected we should fall back to the remote editor: https://github.com/Mikubill/sd-webui-controlnet/blob/f0a94cb2c448ca4ddce5af11589a072d4c97b1aa/javascript/openpose_editor.js#L4

Unless your local setup is responding that error message string with http response status 200. Can you confirm that in the chrome dev tools?

WangGosh commented 7 months ago

嗯,这确实不应该发生,就好像未检测到本地安装一样,我们应该回退到远程编辑器:https://github.com/Mikubill/sd-webui-controlnet/blob/f0a94cb2c448ca4ddce5af11589a072d4c97b1aa/javascript/openpose_editor.js#L4

除非您的本地设置以 http 响应状态 200 响应该错误消息字符串。您可以在 chrome 开发工具中确认这一点吗?

我已经解决了这个问题,云服务器上面的调用地址,需要完整的的地址,例如:/mnt/workspace/stable-diffusion-webui/openpose_editor_index

WangGosh commented 7 months ago

我是更改了https://github.com/huchenlei/sd-webui-openpose-editor/blob/main/scripts/openpose_editor.py,里面的@app.get和@app.post