Closed Jonseed closed 3 months ago
If the path string is correct, it might not a problem of sdppp. I just pass the path to fastapi
... https://github.com/zombieyang/sd-ppp/blob/main/sdppp_python/apis.py#L58
Maybe you could try reinstall the python requirements or the whole A1111 WebUI?
I did some debugging, and it seems FileResponse is receiving an encoded path (with %20 for spaces, etc), and it should be a decoded path. I think that might be causing the problem. I imported urllib.parse and changed the return value to urllib.parse.unquote(res) and it now works.
I looked at the commit 89e8251, and I don't think that will work. The return value of urllib is going nowhere. You can either pass the result of urllib to a new variable, and then send that new variable to FileResponse, or put the entire call to urllib in the value to send to FileResponse, like this: return FileResponse(urllib.parse.unquote(res), media_type='image/png')
Great, thank you
I can send images from Photoshop to Auto1111, but when I try to send from Auto1111 to Photoshop, there is an error in the console that says it can't find the file to send. But the file does exist at that path location, so I'm not sure why it can't find the file. For example: