Skip to content

Skip dot-directories in subdirectory scanning - #1303

Merged
dxqb merged 3 commits into
Nerogar:mergefrom
BitcrushedHeart:fix/skip-dot-directories
Mar 1, 2026
Merged

Skip dot-directories in subdirectory scanning#1303
dxqb merged 3 commits into
Nerogar:mergefrom
BitcrushedHeart:fix/skip-dot-directories

Conversation

@BitcrushedHeart

@BitcrushedHeart BitcrushedHeart commented Feb 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Excludes directories starting with . (e.g. .trash, .ignore, .git) from recursive subdirectory scanning across all "Include Subdirectories" code paths
  • Fixes image preview, concept stats, and concept list scanning in the UI
  • Updates mgds dependency to include the same fix in CollectPaths for the training data loader (see Skip dot-directories in subdirectory scanning mgds#45)

Files changed

  • modules/ui/ConceptWindow.py - preview image glob + stats scan
  • modules/ui/ConceptTab.py - concept list preview glob
  • modules/util/concept_stats.py - legacy scan functions
  • requirements-global.txt - points mgds at fork with CollectPaths fix

Note: Once Nerogar/mgds#45 is merged, requirements-global.txt should be updated to point back at Nerogar/mgds.

Doesn't conflict with #1296.

Excludes directories starting with '.' (e.g. .trash, .ignore, .git)
from subdirectory scanning in concept stats, image preview, and
concept list. Also updates mgds dependency to include the same fix
in the training data loader.
@dxqb

dxqb commented Feb 10, 2026

Copy link
Copy Markdown
Collaborator

I haven't seen this problem yet, but if there are tools that write image files to hidden directories (such as trash or thumbnails), I'm in favor of this change because it would be a big unexpected issue if OneTrainer trains on hidden thumbnails of low resolution instead of the real samples

@BitcrushedHeart

Copy link
Copy Markdown
Contributor Author

Digikam, which I used to use as dataset management before writing DatasetStudio, uses .dtrash to hold deleted-but-still-on-disk files as an example, Lightroom I believe does something similar.

Comment thread modules/ui/ConceptWindow.py Outdated
@BitcrushedHeart
BitcrushedHeart requested a review from dxqb February 22, 2026 10:34
@dxqb dxqb added the merging last steps before merge label Feb 27, 2026
@dxqb
dxqb changed the base branch from master to merge March 1, 2026 07:37
@dxqb
dxqb merged commit 8d06100 into Nerogar:merge Mar 1, 2026
1 check passed
@BitcrushedHeart
BitcrushedHeart deleted the fix/skip-dot-directories branch March 29, 2026 15:33
BitcrushedHeart added a commit to BitcrushedHeart/OneTrainer that referenced this pull request Jun 20, 2026
* Skip dot-directories when scanning subdirectories

Excludes directories starting with '.' (e.g. .trash, .ignore, .git)
from subdirectory scanning in concept stats, image preview, and
concept list. Also updates mgds dependency to include the same fix
in the training data loader.


---------

Co-authored-by: BitcrushedHeart <bitcrushedheart@gmail.com>
Co-authored-by: BitcrushedHeart <215311041+BitcrushedHeart@users.noreply.github.com>
Co-authored-by: dxqb <183307934+dxqb@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merging last steps before merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants