ComfyUI
ComfyUI copied to clipboard
Load image batches
Closes #628, closes #23
I think there should be an OK button beside the clear button in the "Pick Images" UI.
With this I can no longer queue prompts if there is an extra SaveImage in the workflow not connected to anything for example.
I think there should be an OK button beside the clear button in the "Pick Images" UI.
Added
With this I can no longer queue prompts if there is an extra SaveImage in the workflow not connected to anything for example.
Isn't that how it's always been? The executor always tries to verify starting from output nodes even if they're not attached to the "main" graph right? (It still works if the detached node isn't an output node)
I have 30000 images in my output folder so this is a bit slow, it also doesn't allow you to filter the list like the current LoadImage node
The pick images should default to the Input folder and there should be a "Replace" and an "Add" instead of just an "Add" because I assume most people just want to pick a single image.
Okay I made it use the list filtering behavior for normal combo boxes like with current LoadImage, so it shouldn't be any slower than that.
I also made the widget display on the node back into an interactable combo box like current LoadImage does. The only thing I couldn't preserve was the behavior when clicking the arrow buttons on the combo box which unfortunately needs litegraph changes to work
Also added the Replace button and it defaults to the input folder
Looks clunky and unrefined, but functionality is great.
Is it normal that the arrow buttons for the file combo are broken?
How is this working? I see no mode? This should output
- A image tensor batch
- A tensor image list
- A single tensor per prompt run
That way it can be used with all methods of image handling and diffusion.
Is it normal that the arrow buttons for the file combo are broken?
With this implementation yes. The list of paths is sent back as an array (which other widgets/types haven't done before) but litegraph assumes that when picking an item with the left/right combo buttons the index of the selected value can be found in the choices array. Since the value is an array instead of a string, and list of choices are strings, it won't report the correct value
It needs a way to ignore the index if it isn't found, or better yet a way for widgets to override their behavior if a button is pressed, but both of those are litegraph patches
I see no mode?
I could add this but I can foresee it needing changes to the executor, currently I don't think you can configure a node to be different modes of OUTPUT_IS_LIST based on settings, instead you'd have to create a new node with it set to true or false
This is why, like I have mentioned a few times, all execution should double check the class.
1 get defaults 2 class function ran 3 double check class var settings and handle accordingly 4 return result from class function
We're using classes and can use them much more powerfully. When we envoke the class to run the function we have an opportunity to check the class attributes again for dynamic changes.
I think OUTPUT_IS_LIST supports values per output:
https://github.com/comfyanonymous/ComfyUI/blob/7ddfed001e8439dfddbdcb523edd3e355b3fb1e4/execution.py#L87-L98
Whereas the INPUT_IS_LIST applies to all inputs.
While less dynamic, it should be doable with an output for each "mode"
Can it be dynamically set or is it static? I've tried changing like return types and stuff and didn't take.
where can i find this node?
where can i find this node?
This is pretty old code and not sure it's compatible anymore. The fork its in is pretty ancient