Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions modules/ui/ConceptTab.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,8 @@ def __get_preview_image(self):
concept_path = ConceptWindow.get_concept_path(getattr(self.concept, 'path', None))
if concept_path:
for path in pathlib.Path(concept_path).glob(glob_pattern):
if any(part.startswith('.') for part in path.relative_to(concept_path).parent.parts):
continue
extension = os.path.splitext(path)[1]
if (path.is_file()
and path_util.is_supported_image_extension(extension)
Expand Down
4 changes: 3 additions & 1 deletion modules/ui/ConceptWindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,8 @@ def __get_preview_image(self):
concept_path = self.get_concept_path(self.concept.path)
if concept_path:
for path in pathlib.Path(concept_path).glob(glob_pattern):
if any(part.startswith('.') for part in path.relative_to(concept_path).parent.parts):
continue
extension = os.path.splitext(path)[1]
if path.is_file() and path_util.is_supported_image_extension(extension) \
and not path.name.endswith("-masklabel.png") and not path.name.endswith("-condlabel.png"):
Expand Down Expand Up @@ -883,7 +885,7 @@ def __get_concept_stats(self, advanced_checks: bool, wait_time: float):
break
stats_dict = concept_stats.folder_scan(path, stats_dict, advanced_checks, self.concept, start_time, wait_time, self.cancel_scan_flag)
if self.concept.include_subdirectories and not self.cancel_scan_flag.is_set(): #add all subfolders of current directory to for loop
subfolders.extend([f for f in os.scandir(path) if f.is_dir()])
subfolders.extend([f for f in os.scandir(path) if f.is_dir() and not f.name.startswith('.')])
self.concept.concept_stats = stats_dict
#update GUI approx every half second
if time.perf_counter() > (last_update + 0.5):
Expand Down
4 changes: 2 additions & 2 deletions modules/util/concept_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ def subfolder_scan(conceptconfig : ConceptConfig, advanced_checks : bool, wait_t

for dir in subfolders:
stats_dict = folder_scan(dir, stats_dict, advanced_checks, start_time, wait_time, cancel_scan_flag)
subfolders.extend([f for f in os.scandir(dir) if f.is_dir()])
subfolders.extend([f for f in os.scandir(dir) if f.is_dir() and not f.name.startswith('.')])

return stats_dict

Expand All @@ -302,7 +302,7 @@ def subfolder_scan_threaded(conceptconfig : ConceptConfig, advanced_checks : boo
stats_futures = []
for dir in subfolders:
stats_futures += [executor.submit(folder_scan, dir, init_concept_stats(advanced_checks), advanced_checks, start_time, wait_time, cancel_scan_flag)]
subfolders.extend([f.path for f in os.scandir(dir) if f.is_dir()])
subfolders.extend([f.path for f in os.scandir(dir) if f.is_dir() and not os.path.basename(f.path).startswith('.')])
stats_results = [f.result() for f in stats_futures]

final_stats = combine_stats_dicts(stats_results, conceptconfig, advanced_checks)
Expand Down
2 changes: 1 addition & 1 deletion requirements-global.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pooch==1.8.2
open-clip-torch==2.32.0

# data loader
-e git+https://github.com/Nerogar/mgds.git@a0c84a3#egg=mgds
-e git+https://github.com/Nerogar/mgds.git@@5bbafa5#egg=mgds

# optimizers
dadaptation==3.2 # dadaptation optimizers
Expand Down