aboutsummaryrefslogtreecommitdiff
path: root/modules/extras.py
diff options
context:
space:
mode:
authorBruno Seoane <brunoseoaneamarillo@gmail.com>2022-10-23 12:27:50 -0300
committerBruno Seoane <brunoseoaneamarillo@gmail.com>2022-10-23 12:27:50 -0300
commit0523704dade0508bf3ae0c8cb799b1ae332d449b (patch)
tree18e67ad79811aeac3a63bc124cc37cadd2cece56 /modules/extras.py
parent28e26c2bef217ae82eb9e980cceb3f67ef22e109 (diff)
Update run_extras to use the temp filename
In batch mode run_extras tries to preserve the original file name of the images. The problem is that this makes no sense since the user only gets a list of images in the UI, trying to manually save them shows that this images have random temp names. Also, trying to keep "orig_name" in the API is a hassle that adds complexity to the consuming UI since the client has to use (or emulate) an input (type=file) element in a form. Using the normal file name not only doesn't change the output and functionality in the original UI but also helps keep the API simple.
Diffstat (limited to 'modules/extras.py')
-rw-r--r--modules/extras.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/extras.py b/modules/extras.py
index 22c5a1c1..29ac312e 100644
--- a/modules/extras.py
+++ b/modules/extras.py
@@ -33,7 +33,7 @@ def run_extras(extras_mode, resize_mode, image, image_folder, input_dir, output_
for img in image_folder:
image = Image.open(img)
imageArr.append(image)
- imageNameArr.append(os.path.splitext(img.orig_name)[0])
+ imageNameArr.append(os.path.splitext(img.name)[0])
elif extras_mode == 2:
assert not shared.cmd_opts.hide_ui_dir_config, '--hide-ui-dir-config option must be disabled'