skip filenames starting with . for img2img and extras batch modes

This commit is contained in:
AUTOMATIC
2022-10-29 08:11:03 +03:00
parent cf8da8e1b0
commit a1e5e0d766
3 changed files with 7 additions and 2 deletions

View File

@@ -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)]