D2 XY Folder Images
Feed every image in a folder into an XY plot, automatically
- image_count
- queue_seed
- refresh_btn
- x / y_list
- LIST
- image_count
XY plots are great for comparing checkpoints, prompts, and seeds - but what if what you actually want to vary is the input image? D2 XY Folder Images is the node that turns "every image in this folder" into an XY list, so you can run an img2img comparison across a whole batch of source images without dragging each one in by hand.
It's a list-source node in the D2 XY family: it produces the same x / y_list text that the XY Plot nodes eat, plus a proper LIST and a count. If you've got a folder of reference shots and you want to see how a style or a controlnet behaves across all of them, this is the node you wire into the x_list of D2 XY Plot Easy.
The inputs that matter
folder- the directory to scan. Path can be absolute; write**inside it (liked:/images/**) to recurse into subfolders even without the toggle.extension- file filter, default*.*. Multiple patterns work comma-separated:*.png, *.jpg, *.webp.include_subfolders- toggle recursion (or use**infolder).sort_by-Name,Date, orRandom.order_by-A-ZorZ-A.refresh_btn- re-scan after you add/remove files in the folder without touching the workflow.queue_seed- a seed input that hooks into the pack's queue mechanics.
Outputs: x / y_list (newline-separated file paths - feed this into an XY Plot), LIST (the same as an array for other list nodes), and image_count (INT).
How to use it
Wire the x / y_list into the x_list (or y_list) of an XY Plot node, set the corresponding x_type to STRING, and let the loop run - each image becomes one cell of the plot. Because the XY loop processes all of x before moving to the next y, put the expensive or many-item dimension on y if you're combining it with a checkpoint sweep. The pack docs recommend exactly that: for heavy operations like loading checkpoints, use y_list.
If the folder changes while you're iterating, hit refresh_btn to re-scan - otherwise the list is whatever it was when the workflow loaded.
Installing
Part of the D2-nodes-ComfyUI pack - install the pack, not the node.
- ComfyUI Manager → search "D2-nodes-ComfyUI" → Install → restart.
- Or
cd ComfyUI/custom_nodes && git clone https://github.com/da2el-ai/D2-nodes-ComfyUIand restart.
Dependencies: piexif, charset-normalizer - nothing heavy, no model downloads. Pack gotcha: v32.0.0+ requires the newer ComfyUI V3 schema; older ComfyUI → use a pre-32.0.0 release.
Where people get burned
Watch the sort_by - Random is useful for sampling a folder but it means the same folder can produce a different plot on reload, which is confusing when you're trying to reproduce results. Also, the *.* default matches everything, including non-image files; if your folder holds captions or metadata, set extension to the image types you actually want or you'll get a plot full of files that can't load. And if you expected image dimensions or names as output, that's not this node's job - pair it with D2 Load Image downstream to actually load what the list names.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| folder | STRING | — | |
| extension | STRING | *.* | — |
| include_subfolders | BOOLEAN | false | — |
| sort_by | COMBO | Name | 3 options: Name, Date, Random |
| order_by | COMBO | A-Z | 2 options: A-Z, Z-A |
| image_countopt | D2_SIMPLE_TEXT | — | |
| queue_seedopt | D2_SEED | — | |
| refresh_btnopt | D2_BUTTON | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| x / y_list | STRING | — |
| LIST | LIST | — |
| image_count | INT | — |