Image Batch Process Switch (Soze)
One node, single image or batch
- Image
- Image_Batch
- IMAGE
- Image_Filename_Path
- Image_Filename
- Image_Filename_No_Ext
- status
Building a workflow that needs to handle either a single test image or a whole batch, depending on the day, usually means keeping two versions of the graph - or rewiring it every time you switch modes. Image Batch Process Switch collapses that into one node: pick which mode you're in with a dropdown, and everything downstream just gets an IMAGE output regardless of which path fed it.
It's a routing node, not a processing one - nothing in the image itself changes. What changes is which of the two possible inputs actually flows through, plus which filename metadata comes along for the ride.
How it works
Set the required Input field to either Image or Image Batch. Whichever you pick, the node passes that corresponding input straight through to its IMAGE output - and passes the matching filename-passthrough string through to the filename outputs too. Wire your single-image path into Image and your batch path into Image_Batch, and toggle the dropdown instead of rewiring the graph every time you want to test on one image before committing to a full batch run.
The inputs and outputs that matter
Input- required, dropdown:ImageorImage Batch. This is the actual switch - it decides which of the two optional inputs gets used.Image- optional, IMAGE. Your single-image path.Image_Batch- optional, IMAGE. Your batch path.Image_Filename_Path_Passthrough/Image_Batch_Filename_Path_Passthrough- optional strings, default empty. Feed these the filename metadata from whichever loader fed the corresponding image input, and the node carries the right one through based on yourInputselection.- Output:
IMAGE- whichever image path you selected. - Outputs:
Image_Filename_Path,Image_Filename,Image_Filename_No_Ext- the filename metadata for the path that was actually selected, in a few forms. - Output:
status- a status string for the switch operation.
How to install it
Through ComfyUI Manager (search "Quality of Life Nodes for ComfyUI" or "Soze") or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/SozeInc/ComfyUI_Soze.git
pip install -r ComfyUI_Soze/requirements.txt
then restart. No models or GPU dependency - it's pure routing logic.
Common issues & troubleshooting
The output is blank even though you wired both inputs. That's expected if the input you didn't select is the one holding valid data - the node only passes through whichever branch matches Input. Double-check the dropdown matches which input you actually want active, especially after copy-pasting or reusing part of a graph.
Filename outputs are empty. Those come from the passthrough string fields, not from the image itself - this node doesn't extract filenames from the image data, it just relays whatever string you fed it. If you want real filename metadata, wire it from an upstream loader (like the pack's own Load Image or Load Images From Folder, which both output filename strings) into the matching passthrough field.
You're not sure which mode to leave it in for a saved workflow. Since this is meant as a manual toggle for switching between testing-on-one-image and running-a-batch, there's no "correct" default - leave it set to whichever mode you use more often, and remember to flip it back before a batch run if you'd switched to single-image for a quick test.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| Input | COMBO | 2 options: Image, Image Batch | |
| Imageopt | IMAGE | — | |
| Image_Batchopt | IMAGE | — | |
| Image_Filename_Path_Passthroughopt | STRING | — | |
| Image_Batch_Filename_Path_Passthroughopt | STRING | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| Image_Filename_Path | STRING | — |
| Image_Filename | STRING | — |
| Image_Filename_No_Ext | STRING | — |
| status | STRING | — |