Skip dot-directories in subdirectory scanning - #1303
Merged
Conversation
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.
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 |
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. |
dxqb
reviewed
Feb 21, 2026
dxqb
requested changes
Feb 21, 2026
dxqb
approved these changes
Feb 27, 2026
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.(e.g..trash,.ignore,.git) from recursive subdirectory scanning across all "Include Subdirectories" code pathsmgdsdependency to include the same fix inCollectPathsfor the training data loader (see Skip dot-directories in subdirectory scanning mgds#45)Files changed
modules/ui/ConceptWindow.py- preview image glob + stats scanmodules/ui/ConceptTab.py- concept list preview globmodules/util/concept_stats.py- legacy scan functionsrequirements-global.txt- points mgds at fork with CollectPaths fixNote: Once Nerogar/mgds#45 is merged,
requirements-global.txtshould be updated to point back atNerogar/mgds.Doesn't conflict with #1296.