ComfyUI Batch Toolkit: Custom nodes that simplify batch operations and improve efficiency.
A collection of useful utility nodes for ComfyUI to facilitate batch processing and workflow automation.
QBug-Batch aims to solve the batch processing challenge in ComfyUI workflows. Our vision is to help users:
By providing specialized nodes for batch operations, we help ComfyUI users save time and focus on creative aspects rather than technical adjustments.
Please import the following example workflow into ComfyUI to get started:
A node that lists files from a directory with optional sorting and filtering capabilities. The node outputs a comma-separated list of files that can be used by other nodes.
Features:
A powerful selector node that implements nested loop behavior for iterating through multiple inputs.
Features:
Usage Example:
input_1: "pic1,pic2,pic3"
limit_1: 0 (no limit)
input_2: "1,2,3,4,5,6,7,8,9,10"
limit_2: 3
This configuration will iterate through all items in input_1, and for each item, will go through 3 items from input_2 before moving to the next input_1 item.
A node that saves images without showing a preview, useful for batch processing.
Search for qbug-batch in the Custom Nodes Manager to install
cd ComfyUI/custom_nodes
git clone https://github.com/your-username/qbug-batch.git
Input Parameters:
directory
: Directory path to list files from. If empty, defaults to ComfyUI's input directory.file_types
: File types to filter, comma-separated (e.g., *.png,*.jpg,*.jpeg,*.webp
).recursive
: Whether to search subdirectories recursively (boolean).sort_by
: File sorting method, options:
name
: Sort by filenamesize
: Sort by file sizemodified_time
: Sort by modification timesort_order
: Sorting order, options:
asc
: Ascendingdesc
: Descendingseparator
: Separator for the output file list, defaults to comma.Output:
file_list
: String of full file paths joined by the specified separator.Input Parameters:
separator
: Separator in input lists used to split strings into items.reset
: Whether to reset the iteration state (boolean).input_n
: The nth input list (required).limit_n
: Iteration limit for the nth input (0 means no limit).Output:
output_n
: Selected item from the nth input in the current iteration.Input Parameters:
images
: Images to save.filename_prefix
: Prefix for saved files, defaults to "ComfyUI".save_metadata
: Whether to save metadata to PNG files (boolean).Output:
{filename_prefix}_{counter:05}_.png
.MIT License