From b5d705e26324e1069e82dda149f7bf494da31142 Mon Sep 17 00:00:00 2001 From: EyeDeck Date: Sat, 24 Sep 2022 09:29:20 -0400 Subject: Disable 'batch img2img' when launched with --hide-ui-dir-config Prevent writing to arbitrary directories, as usual --- modules/img2img.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'modules/img2img.py') 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, "") -- cgit v1.2.1