Files

1.3 KiB

ComfyUI Loop Node

Custom node that provides loop (for-loop) functionality in ComfyUI. This allows you to repeat execution steps by outputting a list of integers, which triggers ComfyUI's list execution behavior.

Features

  • For Loop (Count): Simple loop that runs N times. outputs 0 to N-1.
  • For Loop (Range): Loop based on python range(start, stop, step).

Block Looping (Recursive)

  • Block Loop Start: Marks the beginning of a loop.
    • first_value: Value for the first iteration.
    • total_loops: How many times to loop.
  • Block Loop End: Marks the end of a loop.
    • flow_control: Connect the last node of your loop block here.
    • next_value: The value to pass to the next iteration (connects to recycle_value of Start internally).
    • loop_id: Connect to the loop_id output of Block Loop Start.
    • Note: Connect total_loops and current_loop from Block Loop Start to Block Loop End.

Installation

Navigate to your ComfyUI/custom_nodes/ directory and clone this repository:

git clone https://github.com/t22m003/ComfyUI_LoopNode.git

Usage

Found under the category: Loop

Sponsor

Sponsor