sd-webui-depth-lib icon indicating copy to clipboard operation
sd-webui-depth-lib copied to clipboard

Added symlink support

Open wintrue opened this issue 1 year ago • 3 comments

Describe the bug A clear and concise description of what the bug is.

image

I think the bug is look like :https://github.com/gradio-app/gradio/pull/3037

wintrue avatar Jun 11 '23 07:06 wintrue

The error is in the API. So not sure it's too do with this plugin.

webui/extensions/sd-webui-depth-lib/maps -> symbolic link to /config/models/depthmaps

You can retrieve the files using the API. It's not a permissions issue. You can click on one of the broken preview icons and it loads the full image.

API error: GET:
http://192.168.1.60:9000/file=/config/models/depthmaps/sha pes/hexagon.png {'error': 'HTTPException', 'code': 403, 'detail': 'File not allowed:
/config/models/depthmaps/shapes/hexagon.png.', 'body': '', 'errors': '403: File not allowed:
/config/models/depthmaps/shapes/hexagon.png.'}

OuticNZ avatar Feb 09 '24 21:02 OuticNZ

The issue relates to gradio and the restrictions on where it can serve files from. It can't serve files outside of the app directory structure by default. There is an option call "allowed-path", which allow it to serve files that reside in the allowed paths. Just trying to figure out where to specify that for Automatic1111/SD.Next

OuticNZ avatar Feb 09 '24 23:02 OuticNZ

a fix is coming for SD.Next - add parameter --allowed-path= to where the depth images are located. https://github.com/vladmandic/automatic/commit/8ec457c307db3712df64b5fd953c102fe7844e2d

It's currently in the dev branch.

For Automatic1111 there is already a command line option --gradio-allowed-paths, use this to add the location where the depths are located - https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Command-Line-Arguments-and-Settings#all-command-line-arguments

OuticNZ avatar Feb 11 '24 02:02 OuticNZ