Skip to content

Modify LoadImage node to traverse subdirectories of the input directory#7199

Open
rewolf wants to merge 2 commits intoComfy-Org:masterfrom
rewolf:rewolf/LoadImage-subdir_traversal
Open

Modify LoadImage node to traverse subdirectories of the input directory#7199
rewolf wants to merge 2 commits intoComfy-Org:masterfrom
rewolf:rewolf/LoadImage-subdir_traversal

Conversation

@rewolf
Copy link

@rewolf rewolf commented Mar 12, 2025

Modify LoadImage node to also traverse subdirectories of the input directory

Previously the LoadImage node only displayed direct file contents of input_dir.

This change traverses the full directory tree under the input_dir using os.walk, including symlinks.

This allows users to organize their input files better and even redirect inputs to other locations on disks using symlinks, which is especially useful when there is limited space.

@rewolf rewolf requested a review from comfyanonymous as a code owner March 12, 2025 00:45
@rewolf rewolf changed the title Modify LoadImage node to also traverse subdirectories of the input di… Modify LoadImage node to traverse subdirectories of the input directory Mar 12, 2025
…rectory

Previously the LoadImage node only displayed direct file contents.

This change traverses the full directory tree under the `input_dir` using `os.walk`, including symlinks.
@rewolf rewolf force-pushed the rewolf/LoadImage-subdir_traversal branch from 2c42410 to ad1102f Compare March 12, 2025 07:03
@rewolf
Copy link
Author

rewolf commented Apr 7, 2025

Any chance of this getting looked at?

@comfy-pr-bot
Copy link
Member

Test Evidence Check

⚠️ Warning: Test Explanation Missing

If this PR modifies behavior that requires testing, a test explanation is required. PRs lacking applicable test explanations may not be reviewed until added. Please add test explanations to ensure code quality and prevent regressions.

⚠️ Warning: Visual Documentation Missing

If this PR changes user-facing behavior, visual proof (screen recording or screenshot) is required. PRs without applicable visual documentation may not be reviewed until provided.

You can add it by:

  • GitHub: Drag & drop media directly into the PR description
  • YouTube: Include a link to a short demo

@JoeGaffney
Copy link

This seems a valuable and logical addition. Maybe follow links could be optional

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants