From 1fc1c9a7b15bfc0f65c3dd122f4154dca23fe450 Mon Sep 17 00:00:00 2001 From: Daxton Caylor <164315771+daxcay@users.noreply.github.com> Date: Fri, 16 May 2025 14:22:26 +0530 Subject: [PATCH] Update nodes.py Add all subfolders of input folder into the load image file selector input for easy selection. --- nodes.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nodes.py b/nodes.py index 0a9db1393..0c39ff812 100644 --- a/nodes.py +++ b/nodes.py @@ -1631,8 +1631,10 @@ class LoadImage: @classmethod def INPUT_TYPES(s): input_dir = folder_paths.get_input_directory() - files = [f for f in os.listdir(input_dir) if os.path.isfile(os.path.join(input_dir, f))] - files = folder_paths.filter_files_content_types(files, ["image"]) + files = folder_paths.filter_files_content_types( + [os.path.join(root, f) for root, _, files in os.walk(input_dir) for f in files if os.path.isfile(os.path.join(root, f))], + ["image"] + ) return {"required": {"image": (sorted(files), {"image_upload": True})}, }