aboutsummaryrefslogtreecommitdiffstats
path: root/modules/generation_parameters_copypaste.py
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2023-01-03 18:49:24 +0000
committerAUTOMATIC <16777216c@gmail.com>2023-01-03 18:49:24 +0000
commit3e22e294135ed0327ce9d9738655ff03c53df3c0 (patch)
tree700ec72c52edc355cf92d5193c71232ec6b3bb09 /modules/generation_parameters_copypaste.py
parent82cfc227d735c140447d5b8dca29a71ee9bde127 (diff)
downloadstable-diffusion-webui-gfx803-3e22e294135ed0327ce9d9738655ff03c53df3c0.tar.gz
stable-diffusion-webui-gfx803-3e22e294135ed0327ce9d9738655ff03c53df3c0.tar.bz2
stable-diffusion-webui-gfx803-3e22e294135ed0327ce9d9738655ff03c53df3c0.zip
fix broken send to extras button
Diffstat (limited to 'modules/generation_parameters_copypaste.py')
-rw-r--r--modules/generation_parameters_copypaste.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/generation_parameters_copypaste.py b/modules/generation_parameters_copypaste.py
index d94f11a3..4baf4d9a 100644
--- a/modules/generation_parameters_copypaste.py
+++ b/modules/generation_parameters_copypaste.py
@@ -37,7 +37,10 @@ def quote(text):
def image_from_url_text(filedata):
- if type(filedata) == dict and filedata["is_file"]:
+ if type(filedata) == list and len(filedata) > 0 and type(filedata[0]) == dict and filedata[0].get("is_file", False):
+ filedata = filedata[0]
+
+ if type(filedata) == dict and filedata.get("is_file", False):
filename = filedata["name"]
is_in_right_dir = ui_tempdir.check_tmp_file(shared.demo, filename)
assert is_in_right_dir, 'trying to open image file outside of allowed directories'