Amorano / Jovimetrix

ComfyUI node suite for composition, stream webcams or media files in and out, animation, flow control, making masks, shapes and textures like Houdini and Substance Designer, read MIDI devices. Also has colorization options for workflow nodes via regex, groups and each node.
Other
240 stars 20 forks source link

Feature request: Allow queue to iterate subfolders #50

Closed SeanBannister closed 1 month ago

SeanBannister commented 1 month ago

It'd be amazing if the Queue node could also look at files in subfolders of the specified folder. In my particular case I have a large number of videos I'm trying to iterate over and they're currently categorized.

Adding to this it'd also be amazing if the output directory could keep this same directory structure, I understand this might be out of the scope of this project.

Amorano commented 1 month ago

It'd be amazing if the Queue node could also look at files in subfolders of the specified folder. In my particular case I have a large number of videos I'm trying to iterate over and they're currently categorized.

Adding to this it'd also be amazing if the output directory could keep this same directory structure, I understand this might be out of the scope of this project.

I added a tweak for the Queue Node so you can run sub-directories.

To solve the other part without making the node a little too focused, I added a new node, STRINGER, to help do some string operations. I know there are other packs for that, but, here we are.

image

Is the running idea. You can toggle the "RECURSE" boolean to allow the sub-directories to be processed.

The filter system is a little weird, but:

<directory>;.ext1, ext2,ext3, ext4, ext5

You can add as many extensions as you need, but keep in mind not every image type is supported just because you filter for it -- the Queue node will still return strings where it cant find/load a file type.

Then the string functions you can swap out the path the Queue returns for the new root you want to redirect the images into and you should be good.

Let me know if that helps resolve the issue!

Cheers.

Amorano commented 1 month ago

I am assuming this is good! Let me know if it remains unresolved.