comfyui-qbug-batch

comfyui-qbug-batch
★ 2

批处理工作流自动化参数组合效率提升
为ComfyUI提供批量处理自定义节点,自动组合场景、角色与参数,减少重复调整并提升输出效率。
💡 批量生成多组场景/参数组合的输出,减少手动调整。
🍴 1 Forks💻 Python🔄 2025-04-13
📦
网盘下载
复制链接后前往夸克网盘下载
https://pan.quark.cn/s/af9fbf81e746
📄 README

QBug-Batch: ComfyUI Custom Nodes

A collection of useful utility nodes for ComfyUI to facilitate batch processing and workflow automation.

中文文档

Project Vision

QBug-Batch aims to solve the batch processing challenge in ComfyUI workflows. Our vision is to help users:

  • Efficiently generate multiple outputs by combining different scenes, characters, and parameters
  • Reduce the time spent on manually adjusting workflows for each variation
  • Automate repetitive tasks that would otherwise require multiple manual interventions
  • Improve productivity by allowing systematic exploration of parameter combinations
  • By providing specialized nodes for batch operations, we help ComfyUI users save time and focus on creative aspects rather than technical adjustments.

    Quick Start

    Please import the following example workflow into ComfyUI to get started:

  • crossjoin-example
  • Nodes

    ListFiles

    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:

  • Lists all files from a specified directory
  • Supports file extension filtering
  • Supports alphabetical and date-based sorting
  • Outputs files as a comma-separated string
  • CrossJoinSelector

    A powerful selector node that implements nested loop behavior for iterating through multiple inputs.

    Features:

  • Supports up to 5 input lists
  • Simulates nested loop behavior
  • Each input has an optional limit parameter to control iteration count
  • Maintains state between executions
  • Perfect for batch processing with combinations of parameters
  • 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.

    NoPreviewSaveImage

    A node that saves images without showing a preview, useful for batch processing.

    Installation

    Custom Nodes Manager

    Search for qbug-batch in the Custom Nodes Manager to install

    Repository Cloning

  • Clone this repository into your ComfyUI custom_nodes directory:
  • cd ComfyUI/custom_nodes
    git clone https://github.com/your-username/qbug-batch.git

  • Restart ComfyUI to load the custom nodes.
  • Detailed Node Parameters

    ListFiles

    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 filename
  • size: Sort by file size
  • modified_time: Sort by modification time
  • sort_order: Sorting order, options:
  • asc: Ascending
  • desc: Descending
  • separator: Separator for the output file list, defaults to comma.
  • Output:

  • file_list: String of full file paths joined by the specified separator.
  • CrossJoinSelector

    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.
  • NoPreviewSaveImage

    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:

  • No return value, but saves images to ComfyUI’s output directory.
  • Saved files use the format: {filename_prefix}_{counter:05}_.png.
  • Use Cases

  • Character Generation: Combine different characters with various backgrounds, poses, or styles
  • Style Exploration: Test a single image across multiple artistic styles or parameters
  • Model Evaluation: Run the same prompts across different models to compare results
  • Parameter Tuning: Systematically explore different parameter combinations to find optimal settings
  • License

    MIT License