mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-07 21:00:49 +08:00
Update nodes.py
Add all subfolders of input folder into the load image file selector input for easy selection.
This commit is contained in:
parent
1c2d45d2b5
commit
1fc1c9a7b1
6
nodes.py
6
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})},
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user