ComfyUI Node
BFS Workflow Loop
BFS Workflow Loop: run any part of any workflow once per item, injecting the item (and per-iteration parameters) into nodes you pick, and collect the results in order.
BFS Workflow Loop
- result
- items
- items_b
- item_masks
- images
- count
◄loop{}►
◄count0►
CategoryBFS/Loop
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| result | IMAGE | What one iteration produces; everything upstream of it can be looped. | |
| loop | STRING | {} | Set by the panel: injected nodes and per-iteration widgets. |
| itemsopt | IMAGE | The batch to iterate over: item i is injected on iteration i. | |
| items_bopt | IMAGE | A second batch, same length (e.g. the marked frames next to the plain ones). | |
| item_masksopt | MASK | One mask per item, injected where the panel says (source 'item_masks'). | |
| countopt | INT | 00–256 | Iterations when there are no items (params only); 0 = as many as the longest value list. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | The result of every iteration, in order, as one batch (resized to the first one's size). |
| count | INT | Iterations run. |