mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-04-12 18:33:35 +00:00
filter image files in load image dropdown
This commit is contained in:
parent
22ad513c72
commit
5a30276953
1
nodes.py
1
nodes.py
@ -1654,6 +1654,7 @@ class LoadImage:
|
||||
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"])
|
||||
return {"required":
|
||||
{"image": (sorted(files), {"image_upload": True})},
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user