custom-nodes/backend/lists #532
Replies: 3 comments 9 replies
-
|
I might be confused, but when reading it I got the wrong idea. As it says "An example of this might be processing a series of images one at a time to avoid running out of VRAM" I though the graph will be processed N times. But looking at the actual behavior each node is processed N times and the graph just once. I understand it might solve VRAM issues, but not RAM issues. I want to process a hundreds or thousands of images, sure they don't fit in VRAM, but the same applies to RAM. |
Beta Was this translation helpful? Give feedback.
-
|
I have difficulty understanding this page
why are you explaining this? please state the goal. (the first sentence of the next section makes more sense at this point).
why is it explained then? please state the goal.
what are "data instances" in this case?
does this mean I cannot rely on the batch length of images in my node, because comfy rebatches them as it pleases?
I made two nodes "input: image0, image1, int", one time with and one time without INPUT_IS_LIST and found this not to be the case. if I hook it up with a image0 (batch_size=3) and image1 (batch_size=5), they still have batch_sizes 3 and 5 (as a single entry or a list len=1). If I use a node which constructs image lists (OUTPUT_IS_LIST), the list length are 3 and 5. no padding happens. the padding seems useful for implementing image processing nodes which takes two images as inputs. say I want to implement a "overlay with image" node, my first image is a batch of 10 images, and my second image is just ONE logo, it would make sense to pad the shorter list (the logo in this case) to 10. does this have to do anything with this?
if this is relevant to the explanation, please also insert the code, otherwise this should be a footnote.
I'm lost.
The article seems to be cut off here (The same text was posted here in 2025-04 #69) |
Beta Was this translation helpful? Give feedback.
-
|
I think I figured it out now. READ THIS IF YOU WANT TO UNDERSTAND To follow along make a list of something and connect it to a KSampler. Make sure whatever node you use is a real OUTPUT_IS_LIST list, e.g. "ImpactPack: Make List (Any)" or "ImpactPack: Image Batch to Image List", not of type Two lists Now make an additional list and connect it to another value in the same KSampler. Take moment to think about what will happen when you hit run:
Notice that last two images are the inverted one. What doesn't happen here is a cartesian product where we would expect 6 images, i.e. Padding Now make the two lists of different lengths. What should happen if there are no more items left in one list? Mental model Intuitively you can think about it as "the list node is emitting items one by one". Technically this is not correct but for most practical purposes it's good enough.
What really happens if you set Internally Comfy always uses lists and there are essentially 3 cases:
Update: I developed a whole node pack around this concept if you want to know more and make use of this great feature https://github.com/geroldmeisinger/ComfyUI-outputlists-combiner Update2: I think this explanation is important, thus I posted it again, so it doesn't get collapsed in sub. |
Beta Was this translation helpful? Give feedback.


Uh oh!
There was an error while loading. Please reload this page.
-
custom-nodes/backend/lists
https://docs.comfy.org/custom-nodes/backend/lists
Beta Was this translation helpful? Give feedback.
All reactions