comfyanonymous / ComfyUI

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface.
https://www.comfy.org/
GNU General Public License v3.0
56.32k stars 5.97k forks source link

FEAT: Add subfolder selection to LoadImage node #1220

Open thelemuet opened 1 year ago

thelemuet commented 1 year ago

Add subfolder selection to LoadImage node, allowing to list images from ComfyUI/input/subfolders (if any).

imgload

For people like me who almost exclusively do img2img the input/ folder gets really messy very quickly, easily can get to multiple hundreds of files in there with no way to categorize.

I could be mistaken but I believe this addition would not really add complexity or confusion to users, simply set as default and it can be ignored.

There are some great custom nodes that I use a lot such as Image Sequence Loader by melMass, that allow to enter custom path, perfect for files with specific naming convention (ie: animation sequence). But for general purpose I have not found a custom node solution, hence the feature suggestion.

HaydenReeve commented 8 months ago

I completely agree. I'm attempting to add my path selector as a custom node that does precisely this, but honestly, I'm having quite a bit of trouble making it "comfy-ish" using folder_paths.py's examples.

I might share a dodgy version if I can get something at least functional and then maybe iterate on it, as it's a feature I desperately want.

I for example have the use case of storing my SDXL and SD1.5 together, and I would like to filter to SDXL models loras etc only when I'm on an SDXL workflow.

HiProAI commented 8 months ago

Any update on this anyone?

pto2k commented 7 months ago

The default LoadImage node does not support subfolders. It also does not support preview images before selecting them. It becomes very uncomfortable to use when there are a lot of images in the folder, all with non-descriptive file names.

My current solution is to use the ImageLoad node from WAS Node Suit instead. I browse images in the Input folder or other folders using Double Commander because it has a shortcut key to copy the file path. (well.. I just learned that this shortcut Ctrl+Shift+C works in Windows Explorer too.) Then I can paste the path into the ImageLoad node quickly.

Are there any other good solutions?

HaydenReeve commented 7 months ago

A quick update from me, I am working on this implementation now. It's slow progress as my bucket is particularly full at the moment, but I am hoping to finish this month along with a few other string/path quality of life improvements.

HiProAI commented 1 month ago

This is so needed i cant believe it is not added yet

HiProAI commented 1 month ago

A quick update from me, I am working on this implementation now. It's slow progress as my bucket is particularly full at the moment, but I am hoping to finish this month along with a few other string/path quality of life improvements. @HaydenReeve Did you ever get around to finishing this? Thanks

ltdrdata commented 1 month ago

In my opinion, I think it would be better to create this as a separate custom node.

HaydenReeve commented 1 month ago

A quick update from me, I am working on this implementation now. It's slow progress as my bucket is particularly full at the moment, but I am hoping to finish this month along with a few other string/path quality of life improvements.

@HaydenReeve Did you ever get around to finishing this? Thanks

No. I got a rudimentary version working for myself, but I've had my focus torn away from it for a while now. I've ended up using pysss scripts to handle checkpoint/lora loading which has a nice little dropdown feature. Not quite what I was after, but it's doing the job until I can get around to finishing my own experiments.

I've actually seen some improvements in the main repo which might make what I was doing much, much easier now though. So that's nice :)

LukeG89 commented 1 month ago

Crystools already implemented this feature with the Load image with metadata:

crystools_image_loader

And the subfolders like you see is thanks to rgthree Auto Nest Subdirectories feature: rgthree_auto_nest

freeo commented 1 week ago

While Crystools + Auto Nesting is nice, it doesn't follow symlinks. I'd love for the subfolders to support symlinks, so that all my potential input images don't have to live inside of comfyui/input. This would make management of big image collections way easier.