aboutsummaryrefslogtreecommitdiffstats
path: root/modules/shared.py
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2022-11-27 08:52:53 +0000
committerAUTOMATIC <16777216c@gmail.com>2022-11-27 08:52:53 +0000
commitb006382784a2f0887317bb60ea49d19b50a5dc7e (patch)
treeea9ea0e697e630924c86ad264de97d5399c186e3 /modules/shared.py
parentb5050ad2071644f7b4c99660dc66a8a95136102f (diff)
downloadstable-diffusion-webui-gfx803-b006382784a2f0887317bb60ea49d19b50a5dc7e.tar.gz
stable-diffusion-webui-gfx803-b006382784a2f0887317bb60ea49d19b50a5dc7e.tar.bz2
stable-diffusion-webui-gfx803-b006382784a2f0887317bb60ea49d19b50a5dc7e.zip
serve images from where they are saved instead of a temporary directory
add an option to choose a different temporary directory in the UI add an option to cleanup the selected temporary directory at startup
Diffstat (limited to 'modules/shared.py')
-rw-r--r--modules/shared.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/shared.py b/modules/shared.py
index 8fb1387a..af975f54 100644
--- a/modules/shared.py
+++ b/modules/shared.py
@@ -16,6 +16,9 @@ import modules.devices as devices
from modules import localization, sd_vae, extensions, script_loading
from modules.paths import models_path, script_path, sd_path
+
+demo = None
+
sd_model_file = os.path.join(script_path, 'model.ckpt')
default_sd_model_file = sd_model_file
parser = argparse.ArgumentParser()
@@ -292,6 +295,10 @@ options_templates.update(options_section(('saving-images', "Saving images/grids"
"use_original_name_batch": OptionInfo(False, "Use original name for output filename during batch process in extras tab"),
"save_selected_only": OptionInfo(True, "When using 'Save' button, only save a single selected image"),
"do_not_add_watermark": OptionInfo(False, "Do not add watermark to images"),
+
+ "temp_dir": OptionInfo("", "Directory for temporary images; leave empty for default"),
+ "clean_temp_dir_at_start": OptionInfo(False, "Cleanup non-default temporary directory when starting webui"),
+
}))
options_templates.update(options_section(('saving-paths', "Paths for saving"), {