βοΈ Filter List
Filter List (SDVN)
- input
- any
Filter List is a plumbing node: it takes a list of anything and gives you back a subset - either a slice by index, or the entries that a matching boolean list marked true. If you're building an automated graph that produces a batch of things (images, strings, latents) and you only want some of them to continue, this is the valve.
It handles the "any" case on purpose. The input is typed *, meaning it'll take a list of any type - images, text, numbers, masks, whatever - and the any output comes back as a list of that same type. So it's not an image filter or a string filter; it's a general list filter you can drop into any batch flow.
There are two ways it filters, and they stack. The index way uses start and end: start defaults to 0 and end to -1, and that's a standard slice - end: -1 means "through the last item," so the defaults pass everything, while start: 2, end: 5 keeps a middle window. The condition way uses the optional boolean input: feed it a list of true/false values the same length as your input, and Filter List keeps only the entries where the boolean is true. That's the powerful mode, because that boolean list can come from a comparison somewhere upstream. The pack's own worked example is exactly this - filter a batch of images down to only the ones whose width is β₯ 1000px, by generating a boolean list from a width check and feeding it here.
The inputs that matter depend on which mode you're in. For a plain slice, it's just start and end. For a conditional filter, it's input plus a matching boolean list, and you mostly leave start/end at their defaults so the boolean does the work. The single any output is the filtered list, ready to fan out into whatever processes each item - a loop, a save node, another list operation.
Where it fits: this is the kind of node you never think about until you're building something that runs unattended, and then it's indispensable. Auto-culling a generated batch, keeping every Nth frame, dropping the results that failed a size or quality gate before they hit an expensive downstream step - all of that is a Filter List plus whatever produces the boolean. It's glue, and good glue is invisible when it works.
Install comes with the pack. ComfyUI Manager, search SDVN_Comfy_node; or cd ComfyUI/custom_nodes && git clone https://github.com/StableDiffusionVN/SDVN_Comfy_node, then pip install -r custom_nodes/SDVN_Comfy_node/requirements.txt from your ComfyUI root and restart. Nothing to download - it's a pure logic node.
Troubleshooting is short because there's little to break. The classic mistake is a boolean list whose length doesn't match the input list - if you're getting the wrong items through, check that the comparison producing your booleans emits exactly one true/false per input entry, in order. The other thing to remember is that this operates on lists, so whatever's feeding input needs to actually be a list (from a batch loader, a repeat node, or another list op), not a single item - a lone image isn't a one-element list unless something made it one. Get those two right and it just works.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| start | INT | 0 | β |
| end | INT | -1 | β |
| input | * | β | |
| booleanopt | BOOLEAN | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| any | * | β |