ComfyUI Node
Partition (list)
Splits a list into kept and rejected by the expression. Feed the expensive branch only kept, and guard that branch with a Gate on kept_count > 0: an empty list does not map zero times.
Partition (list)
- items
- values
- kept
- rejected
- kept_count
- rejected_count
◄expressionitem > 0►
CategoryMAINodes/Flow
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| items | * | — | |
| expression | STRING | item > 0 | — |
| valuesopt | COMFY_AUTOGROW_V3 | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| kept | * | — |
| rejected | * | — |
| kept_count | INT | — |
| rejected_count | INT | — |