diff options
author | AUTOMATIC <16777216c@gmail.com> | 2022-10-29 08:11:03 +0300 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2022-10-29 08:11:03 +0300 |
commit | a1e5e0d7669def010ecf31d801d6f0667bcf8061 (patch) | |
tree | 640f6a5abb607c9553731502dbcd4497c5677d11 /modules/shared.py | |
parent | cf8da8e1b0b8a4ea75c66ed4657f409cadab2c59 (diff) |
skip filenames starting with . for img2img and extras batch modes
Diffstat (limited to 'modules/shared.py')
-rw-r--r-- | modules/shared.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/shared.py b/modules/shared.py index 7c428d90..7e634423 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -450,3 +450,8 @@ total_tqdm = TotalTQDM() mem_mon = modules.memmon.MemUsageMonitor("MemMon", device, opts)
mem_mon.start()
+
+
+def listfiles(dirname):
+ filenames = [os.path.join(dirname, x) for x in sorted(os.listdir(dirname)) if not x.startswith(".")]
+ return [file for file in filenames if os.path.isfile(file)]
|