-
Notifications
You must be signed in to change notification settings - Fork 27.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: gradio's ValueError about fetching extensions files #8492
Merged
AUTOMATIC1111
merged 6 commits into
AUTOMATIC1111:master
from
arenekosreal:absolute-path
Mar 12, 2023
Merged
fix: gradio's ValueError about fetching extensions files #8492
AUTOMATIC1111
merged 6 commits into
AUTOMATIC1111:master
from
arenekosreal:absolute-path
Mar 12, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This may be helpful for #7028, because we won't change working directory to the repo now, instead, we will use any working directory. If we set working directory to a path contains repo and the custom --data-dir, the problem in this issue should be solved. Howewer, this may be treated as an incompatible change if some code assume the working directory is always the repo. Also, there may be another solution that always let --data-dir be the subdirectory of the repo, but personally I think this may not be what we actually need. As this issue mainly influent on Docker and I am not familiar with .bat files, updating webui.bat is skipped. webui.sh: source env from repo instead $PWD
launch.py: using getcwd() instead curdir launch.py: use absolute path for preparing also remove chdir() launch.py: use absolute path for test launch.py: add default script_path and data_path
test/server_poll.py: fix absolute path
AUTOMATIC1111
approved these changes
Mar 12, 2023
|
AUTOMATIC1111
added a commit
that referenced
this pull request
Mar 12, 2023
AUTOMATIC1111
added a commit
that referenced
this pull request
Mar 12, 2023
There is a problem people are getting with webui.sh after this PR. See #8534. |
serg4kostiuk
pushed a commit
to talkable/stable-diffusion-webui
that referenced
this pull request
Mar 22, 2023
fix: gradio's ValueError about fetching extensions files
serg4kostiuk
pushed a commit
to talkable/stable-diffusion-webui
that referenced
this pull request
Mar 22, 2023
…ode contains spaces.
serg4kostiuk
pushed a commit
to talkable/stable-diffusion-webui
that referenced
this pull request
Mar 22, 2023
serg4kostiuk
pushed a commit
to talkable/stable-diffusion-webui
that referenced
this pull request
Mar 22, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Describe what this pull request is trying to achieve.
Let all file paths that script try to read/write be absolute.
Currently, if we set
--data-dir
to a path like/path/to/data
which is outside the repo, gradio will complain about that the/path/to/data/extensions
is not inside of the working directory. This pull request helps with it, with this pull request, we can use any working directory. As for the issue mentioned before, we can use/path/to/webui
for this repo and/path/to/data
for keeping data, the only to do is setting working directory to/path/to
Additional notes and description of your changes
See #7028 for more info about the compilation of gradio
For some extensions and even some parts of this project, if they assume the working directory is always the repo's root, this pull request may be an incompatible change for them.
I have tested on my PC and it seems to work well, but I failed to run tests mentioned in wiki successfully even with unchanged code.
So I let this pull request be a draft and prepare for more tests for this pull request.I think this pull request is ready to be reviewed.What's more, output dir is
outputs
by default, which is always relative to working directory. But I don't find how to change it correctly. Maybe we should let it be relative to--data-dir
or implementing #3776 is a good idea.Environment this was tested in
List the environment you have developed / tested this on. As per the contributing page, changes should be able to work on Windows out of the box.
Note: OS is actually an Arch Linux runs a Podman rootless container based on nvidia/cuda:11.7.1-runtime-ubuntu22.04 image with requirements installed.
Screenshots or videos of your changes
N/A