mirror of
https://github.com/DominikDoom/a1111-sd-webui-tagcomplete.git
synced 2026-11-05 00:17:25 +00:00
[GH-ISSUE #136] Error: Extension Path is not in the subpath of WebUI Path #98
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
low priority
low priority
pull-request
question
waiting for feedback
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
DominikDoom/a1111-sd-webui-tagcomplete#98
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @CriticalSteffen on GitHub (Mar 9, 2023).
Original GitHub issue: https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/issues/136
In the
webui-user.shscript, I have configured the--data-diroption to store extensions, models, etc. on a separate drive. Unfortunately, whentag_autocomplete_helper.pyattempts to locate necessary files, it does so viaPath().absolute()on line 10 of the tagcomplete Python script. Instead of returning the path of the extension's script, this returns the path of the stable-diffusion-webui/launch.py script, which results in the script attempting to load tags from a folder that doesn't exist:This breaks the extension.
I'm unaware of any current workaround.
@DominikDoom commented on GitHub (Mar 10, 2023):
This is similar to the underlying issues in #78, #132 and #134.
TL;DR:
Gradio only allows fetching files in the root or subfolders of the app for security reasons. This script is 80% javascript and reliant on what the browser can access, so even if the python helper would take those paths into account, I can't access them in javascript. As far as I know there's no way to bypass that. Maybe there would be a way around it by temporarily copying files or doing some junction symlink shenanigans, but that is well outside what this script would be allowed to do on a normal system (and also very dodgy), so it would need to be done by the user themselves.
@DominikDoom commented on GitHub (Jun 15, 2023):
@CriticalSteffen Good news, if still needed:
With the most recent update, the extension can now work with data-dir.
You will need to add the
--gradio-allowed-pathargument to your webui start script to make this work, else the helper will not throw the error anymore, but the server will still return 403 Unauthorized for any extension javascript file or tags file the webui tries to load.A word of caution if you share the webui on your local network or even as a public server:
The allowed path will be publicly exposed. A simple JavaScript
fetch("file=path/to/file")can access any file contents in that directory and its subdirectories, as long as the filename is known. You need to be careful what you allow in there.I suggest only allowing the install dir of tag autocomplete itself for base functionality, or if you use wildcard extensions and want to use the wildcard completion feature, the whole extensions dir at most.