Generate thumbnails for dataset items so things load faster and the ui is more stable. Especially good for videos.

This commit is contained in:
Jaret Burkett
2026-08-12 20:33:42 -06:00
parent 175cc1e151
commit 7f9a142dfd
4 changed files with 185 additions and 19 deletions

View File

@@ -163,7 +163,8 @@ class BaseCaptioner(BaseExtensionProcess):
def find_files(self):
# recursivly find all the files in the path_to_caption with the specified extensions and save the paths to self.file_paths
for root, dirs, files in os.walk(self.caption_config.path_to_caption):
dirs[:] = [d for d in dirs if d != "_controls"]
# skip _controls and hidden dirs (.thumbs, .tmp)
dirs[:] = [d for d in dirs if d != "_controls" and not d.startswith(".")]
for file in files:
if any(
file.lower().endswith(f".{ext}") and not file.startswith(".")