Boyo Loop Collector
Turn every iteration of a bastard loop into one contact sheet
- loop_result
- grid_image
- individual_images
When a loop runs, each iteration produces a result - and if you're iterating over prompts, seeds, or LoRA strengths, the whole point is comparing them afterward. Boyo Loop Collector does that comparison for you. It takes the loop's accumulated result, pulls the image out of each iteration, and returns both a labeled contact-sheet grid and the individual images as a list. One run, one grid, instant visual review of every pass.
It's part of the pack's "bastard loops" family - the While/For loop nodes that patch ComfyUI's execution engine to allow genuine cycles. Collector is the tidy-up end of that system: the loop runs, and this node is how you actually see what it produced.
The inputs that matter
- loop_result - a BASTARD_LOOP_RESULT, straight from a Boyo While Loop End or For Loop End.
- target_output_index - which output slot of the looped node to grab as the image, default 0. If your loop's image isn't the first output, bump this.
- grid_columns - columns for the contact sheet; 0 (default) auto-calculates a square-ish grid.
- spacing - gap between cells in pixels, default 10.
- add_labels - overlay iteration labels on each cell, default on. Keep it on; it's the difference between a grid and a grid you can read.
- background_color - grid background, default
#000000.
Outputs: grid_image (the assembled contact sheet as one IMAGE) and individual_images (an IMAGE list, one per iteration - wire it to a saver or a video encoder).
Install
Part of Boyonodes. ComfyUI Manager → search "Boyonodes", or:
cd ComfyUI/custom_nodes
git clone https://github.com/DragonDiffusionbyBoyo/Boyonodes
Restart. No extra pip packages beyond the pack's own loop machinery.
Gotchas
If the loop result is invalid or has no iterations, it returns a blank black 512×512 frame rather than crashing - which is friendly, but also means a blank grid can masquerade as "nothing happened." If your grid comes back black, check the loop actually completed and that target_output_index points at a node output that was an image. And remember: it reads images from the loop's captured outputs, so whatever you want on the sheet needs to be an output of a node inside the loop body.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| loop_result | BASTARD_LOOP_RESULT | — | |
| target_output_index | INT | 00–10 | — |
| grid_columns | INT | 00–20 | — |
| spacing | INT | 100–100 | — |
| add_labels | BOOLEAN | true | — |
| background_coloropt | STRING | #000000 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| grid_image | IMAGE | — |
| individual_images | IMAGE | — |