aboutsummaryrefslogtreecommitdiffstats
path: root/modules/images_history.py
diff options
context:
space:
mode:
authoryfszzx <yfszzx@gmail.com>2022-10-16 04:34:05 +0000
committeryfszzx <yfszzx@gmail.com>2022-10-16 04:34:05 +0000
commit5d8c59eee505cf15ec6994d05bb941440d90e44e (patch)
treea87f6e38d4dc33e3f293f10f9cdd1760af93114c /modules/images_history.py
parent763b893f319cee280b86e63025eb55e7c16b02e7 (diff)
parentd41ac174e24e1e7cdcf7b42f2a03cbc6394eb5e5 (diff)
downloadstable-diffusion-webui-gfx803-5d8c59eee505cf15ec6994d05bb941440d90e44e.tar.gz
stable-diffusion-webui-gfx803-5d8c59eee505cf15ec6994d05bb941440d90e44e.tar.bz2
stable-diffusion-webui-gfx803-5d8c59eee505cf15ec6994d05bb941440d90e44e.zip
Merge branch 'master' of https://github.com/yfszzx/stable-diffusion-webui-plus
Diffstat (limited to 'modules/images_history.py')
-rw-r--r--modules/images_history.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/images_history.py b/modules/images_history.py
index 533cf51b..7fd75005 100644
--- a/modules/images_history.py
+++ b/modules/images_history.py
@@ -197,14 +197,16 @@ def delete_image(delete_num, tabname, name, page_index, filenames, image_index):
return new_file_list, 1
def show_images_history(gr, opts, tabname, run_pnginfo, switch_dict):
- if tabname == "txt2img":
+ if opts.outdir_samples != "":
+ dir_name = opts.outdir_samples
+ elif tabname == "txt2img":
dir_name = opts.outdir_txt2img_samples
elif tabname == "img2img":
dir_name = opts.outdir_img2img_samples
elif tabname == "extras":
dir_name = opts.outdir_extras_samples
d = dir_name.split("/")
- dir_name = d[0]
+ dir_name = "/" if dir_name.startswith("/") else d[0]
for p in d[1:]:
dir_name = os.path.join(dir_name, p)