Disable 'batch img2img' when launched with --hide-ui-dir-config

Prevent writing to arbitrary directories, as usual
This commit is contained in:
EyeDeck
2022-09-24 09:29:20 -04:00
committed by AUTOMATIC1111
parent a2bea2f97a
commit b5d705e263
3 changed files with 7 additions and 4 deletions

View File

@@ -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, "")