Comments (10)
Sounds like same issue. I'm not familiar with FastAPI
, but looks like it does handle proxy scenario:
https://fastapi.tiangolo.com/advanced/behind-a-proxy/
from sd-webui-openpose-editor.
The redirection could be caused by extra /
at the end of the editor path:
However in sd-webui-controlnet repo, the editor path has no ending /
:
const EDITOR_PATH = '/openpose_editor_index';
I guess FastAPI
would somehow issue a redirection in such situation.
Removed the extra /
and now openpose editor UI can be loaded properly in RunPod.
Guess I'm too lazy to create a pull request, but it's only 2 lines of change:
index 21d7dd1..ba9b118 100644
--- a/scripts/openpose_editor.py
+++ b/scripts/openpose_editor.py
@@ -110,13 +110,13 @@ def mount_openpose_api(_: gr.Blocks, app: FastAPI):
name="openpose_editor",
)
- @app.get("/openpose_editor_index/", response_class=HTMLResponse)
+ @app.get("/openpose_editor_index", response_class=HTMLResponse)
async def index_get(request: Request):
return templates.TemplateResponse(
"index.html", {"request": request, "data": {}}
)
- @app.post("/openpose_editor_index/", response_class=HTMLResponse)
+ @app.post("/openpose_editor_index", response_class=HTMLResponse)
async def index_post(request: Request, item: Item):
return templates.TemplateResponse(
"index.html", {"request": request, "data": item.dict()}
After all it has nothing to do with the path prefixes.
from sd-webui-openpose-editor.
same problem here
from sd-webui-openpose-editor.
Do you have any additional setup of an web server proxy?
The editor is setup to use relative path /openpose_editor_index
.
According to the log messages, you are running WebUI locally on port 3000, but the editor is accessing port 60892.
There is nothing I can do in the repo as it is already relative path. You would need to figure out why the FastAPI route /openpose_editor_index
is not served with HTTPS in your setup.
from sd-webui-openpose-editor.
The WebUI is running behind a RunPod proxy:
https://docs.runpod.io/docs/expose-ports
It maps internal URL http://127.0.0.1:3000
to external URL like https://{POD_ID}-{INTERNAL_PORT}.proxy.runpod.net:{EXTERNAL_PORT}
.
However the blocked URL http://100.65.14.206:60892/openpose_editor_index/
wasn't the URL exposed by RunPod proxy, don't know how FastAPI
made the IP/port. But certainly it's not truely using relative path.
Is it possible to ask FastAPI
to use real relative path?
from sd-webui-openpose-editor.
This seems like a similar issue to #26.
from sd-webui-openpose-editor.
Seems like I should prefix the path with /sdapi/v1
as all other paths in WebUI have this prefix.
from sd-webui-openpose-editor.
Well. Things are pretty messy on WebUI's part. There are also prefix /internal
other than sdapi/v1
. You can try adding these prefixes to both this repo and controlnet repo to see if the problem is solved. I do not own a runpod instance so I cannot reproduce/test it.
Refs:
from sd-webui-openpose-editor.
Adding the prefix doesn't solve the issue.
In browser console fetch('/sdapi/v1/openpose_editor_index')
got a redirection (HTTP 307) to the non-https URL:
Cf-Cache-Status: DYNAMIC
Cf-Ray: 7da0b7f85abd0495-HKG
Content-Length: 0
Date: Tue, 20 Jun 2023 02:52:57 GMT
Location: http://100.65.10.194:60775/sdapi/v1/openpose_editor_index/
Nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
Report-To: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=r2QumR4do3Hk3E8F2dOjE5iQNnccFN9CGKtHvMU6KswHyv4le3pfLIwAQRtZBLlrhEU%2BXf9h%2FssC4vjE8UX64yX0apdY0vVRGJ5C7P70rye8fk4h39PpOQT7l5PpWycNSeyV8lRzEDwtW%2Bb7UWOAGlKchnCMQw%3D%3D"}],"group":"cf-nel","max_age":604800}
Server: cloudflare
Strict-Transport-Security: max-age=63072000; includeSubDomains
RunPod doesn't seem to produce the redirection automatically as fetch('/info')
got a normal HTTP 200 response.
Any idea where in the code issued the redirection?
from sd-webui-openpose-editor.
Fixed in 84b1fe1. Thanks for tracking this down!
from sd-webui-openpose-editor.
Related Issues (20)
- Improve grouping HOT 1
- Is it possible to connect hands and wrists? HOT 2
- [Bug]: Openpose editor not found when it is installed and localhost webpage works HOT 2
- The pose cannot be deleted HOT 3
- [Bug]: 下载安装后仍然无法使用 HOT 3
- How to generate the pose structure of characters in images through API HOT 1
- [Bug]: Unable to 3D rotate HOT 2
- Enhancement: Mirror Body HOT 4
- Is there any way to save it in canvas size? HOT 1
- [Bug]: Automatic1111 install fail HOT 10
- rewrite the key points HOT 3
- [Bug]: Openpose editor window very narrow, unable to enlarge HOT 5
- [DevTask] Support animal pose editing HOT 1
- [Feature Request] ComfyUI integration (code snippet for obtaining json inside) HOT 2
- [Bug]: Unable to edit face points HOT 3
- [Bug]: What the goal to have a image request on www.photopea.com ? HOT 2
- [Bug]: "Edit" is not clickable HOT 10
- Editing actions cannot be synced to contronet HOT 1
- [Bug]: The window of openpose-editor is too small HOT 2
- [Bug]: The openpose edit window is not displayed correctly. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sd-webui-openpose-editor.