diff options
author | AUTOMATIC <16777216c@gmail.com> | 2023-05-17 18:45:26 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2023-05-17 18:45:26 +0000 |
commit | 8fe9ea7f4d8fd76038db61e1fd2b1cc5927ce108 (patch) | |
tree | f2c35eb47c3f53334240af38f0c6f223b89f3713 /modules/shared.py | |
parent | a6b618d07248267de36f0e8f4a847d997285e272 (diff) | |
download | stable-diffusion-webui-gfx803-8fe9ea7f4d8fd76038db61e1fd2b1cc5927ce108.tar.gz stable-diffusion-webui-gfx803-8fe9ea7f4d8fd76038db61e1fd2b1cc5927ce108.tar.bz2 stable-diffusion-webui-gfx803-8fe9ea7f4d8fd76038db61e1fd2b1cc5927ce108.zip |
add options to show/hide hidden files and dirs, and to not list models/files in hidden directories
Diffstat (limited to 'modules/shared.py')
-rw-r--r-- | modules/shared.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/shared.py b/modules/shared.py index 76af8b9c..23563582 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -378,6 +378,7 @@ options_templates.update(options_section(('system', "System"), { "samples_log_stdout": OptionInfo(False, "Always print all generation info to standard output"),
"multiple_tqdm": OptionInfo(True, "Add a second progress bar to the console that shows progress for an entire job."),
"print_hypernet_extra": OptionInfo(False, "Print extra hypernetwork information to console."),
+ "list_hidden_files": OptionInfo(True, "Load models/files in hidden directories").info("directory is hidden if its name starts with \".\""),
}))
options_templates.update(options_section(('training', "Training"), {
@@ -446,6 +447,8 @@ options_templates.update(options_section(('interrogate', "Interrogate Options"), }))
options_templates.update(options_section(('extra_networks', "Extra Networks"), {
+ "extra_networks_show_hidden_directories": OptionInfo(True, "Show hidden directories").info("directory is hidden if its name starts with \".\"."),
+ "extra_networks_hidden_models": OptionInfo("When searched", "Show cards for models in hidden directories", gr.Radio, {"choices": ["Always", "When searched", "Never"]}).info('"When searched" option will only show the item when the search string has 4 characters or more'),
"extra_networks_default_view": OptionInfo("cards", "Default view for Extra Networks", gr.Dropdown, {"choices": ["cards", "thumbs"]}),
"extra_networks_default_multiplier": OptionInfo(1.0, "Multiplier for extra networks", gr.Slider, {"minimum": 0.0, "maximum": 1.0, "step": 0.01}),
"extra_networks_card_width": OptionInfo(0, "Card width for Extra Networks").info("in pixels"),
@@ -825,4 +828,7 @@ def walk_files(path, allowed_extensions=None): if ext not in allowed_extensions:
continue
+ if not opts.list_hidden_files and ("/." in root or "\\." in root):
+ continue
+
yield os.path.join(root, filename)
|