diff options
author | AUTOMATIC <16777216c@gmail.com> | 2023-01-01 08:38:17 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2023-01-01 08:38:17 +0000 |
commit | b46b97fa297b3a4a654da77cf98a775a2bcab4c7 (patch) | |
tree | f23c2053396081fc955a290b838117509f2ae88b | |
parent | 76f256fe8f844641f4e9b41f35c7dd2cba5090d6 (diff) | |
download | stable-diffusion-webui-gfx803-b46b97fa297b3a4a654da77cf98a775a2bcab4c7.tar.gz stable-diffusion-webui-gfx803-b46b97fa297b3a4a654da77cf98a775a2bcab4c7.tar.bz2 stable-diffusion-webui-gfx803-b46b97fa297b3a4a654da77cf98a775a2bcab4c7.zip |
more fixes for gradio update
-rw-r--r-- | modules/generation_parameters_copypaste.py | 2 | ||||
-rw-r--r-- | modules/ui_tempdir.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/generation_parameters_copypaste.py b/modules/generation_parameters_copypaste.py index fbd91300..54b3372d 100644 --- a/modules/generation_parameters_copypaste.py +++ b/modules/generation_parameters_copypaste.py @@ -38,7 +38,7 @@ def quote(text): def image_from_url_text(filedata):
if type(filedata) == dict and filedata["is_file"]:
filename = filedata["name"]
- is_in_right_dir = any(Path(temp_dir).resolve() in Path(filename).resolve().parents for temp_dir in shared.demo.temp_dirs)
+ is_in_right_dir = any([filename in fileset for fileset in shared.demo.temp_file_sets])
assert is_in_right_dir, 'trying to open image file outside of allowed directories'
return Image.open(filename)
diff --git a/modules/ui_tempdir.py b/modules/ui_tempdir.py index 8d519310..363d449d 100644 --- a/modules/ui_tempdir.py +++ b/modules/ui_tempdir.py @@ -45,7 +45,7 @@ def on_tmpdir_changed(): os.makedirs(shared.opts.temp_dir, exist_ok=True)
- shared.demo.temp_dirs = shared.demo.temp_dirs | {os.path.abspath(shared.opts.temp_dir)}
+ shared.demo.temp_file_sets[0] = shared.demo.temp_file_sets[0] | {os.path.abspath(shared.opts.temp_dir)}
def cleanup_tmpdr():
|