aboutsummaryrefslogtreecommitdiffstats
path: root/modules/img2img.py
diff options
context:
space:
mode:
authorEyeDeck <eyedeck@gmail.com>2022-09-24 13:29:20 +0000
committerAUTOMATIC1111 <16777216c@gmail.com>2022-09-24 16:06:36 +0000
commitb5d705e26324e1069e82dda149f7bf494da31142 (patch)
tree80fb8ba443d5081d3dc7b5e95c7adca637cdc754 /modules/img2img.py
parenta2bea2f97aab6ef60afe6534611e646f66226868 (diff)
downloadstable-diffusion-webui-gfx803-b5d705e26324e1069e82dda149f7bf494da31142.tar.gz
stable-diffusion-webui-gfx803-b5d705e26324e1069e82dda149f7bf494da31142.tar.bz2
stable-diffusion-webui-gfx803-b5d705e26324e1069e82dda149f7bf494da31142.zip
Disable 'batch img2img' when launched with --hide-ui-dir-config
Prevent writing to arbitrary directories, as usual
Diffstat (limited to 'modules/img2img.py')
-rw-r--r--modules/img2img.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/img2img.py b/modules/img2img.py
index bce8b712..d80b3e75 100644
--- a/modules/img2img.py
+++ b/modules/img2img.py
@@ -108,6 +108,8 @@ def img2img(mode: int, prompt: str, negative_prompt: str, prompt_style: str, pro
p.extra_generation_params["Mask blur"] = mask_blur
if is_batch:
+ assert not shared.cmd_opts.hide_ui_dir_config, "Launched with --hide-ui-dir-config, batch img2img disabled"
+
process_batch(p, img2img_batch_input_dir, img2img_batch_output_dir, args)
processed = Processed(p, [], p.seed, "")