Nodes/ComfyUI-JakeUpgrade/Create Loop Schedule List๐Ÿ‰
ComfyUI Node

Create Loop Schedule List๐Ÿ‰

The loop counter list that tells your animation workflow which segment is running

By jakechaiยทCreated 2 years agoยทUpdated 3 months agoยท 147
Create Loop Schedule List๐Ÿ‰
    • int_list
    โ—„loop_count5โ–บ
    โ—„start_index1โ–บ

    Looping in ComfyUI is awkward: you want to run the same segment N times and have something in the graph know which iteration it's on. Create Loop Schedule List is JakeUpgrade's answer - a one-job node that spits out a sequential list of integers you can feed to a for-loop mechanism, so each pass gets its own index.

    Jake added it in v2.0.0 alongside the pack's big video-generation push, where the "Cuts" workflows generate video based on scene and audio cuts - segment 1, segment 2, segment 3, each generated in sequence. The list is the schedule: [1, 2, 3, 4, 5] tells the loop "run five times, and here's your index." It's the kind of tiny node that makes a for-loop graph legible instead of a tangle of counters.

    How it works

    Open the source and the whole thing is a list comprehension:

    step_list = [start_index + i for i in range(loop_count)]
    

    So loop_count is how many entries you get and start_index is where they begin. Two inputs, one output:

    • loop_count - default 5, min 2, max 1000.
    • start_index - default 1, min 1, max 1000. Added in v2.6.9, so update the pack if you don't see it.

    The output is a single int_list of type ITEM_LIST. That's the type the loop plumbing in ComfyUI Easy Use (and similar for-loop nodes) wants - you iterate over the list and each iteration receives one integer. Want your schedule to start at zero because you're indexing frames or seeds? That's the start_index field's whole job now.

    Where you'd actually use it

    The canonical spot is a Wan "Cuts" or scene-based video workflow: loop through the segments, and the index gets used by other nodes to pull the right scene cut, audio cut, or seed from a list. It's also useful for any "generate N variations, seed increments by iteration" setup - loop N times and add the index to your seed. Honestly, if you're not doing multi-pass generation you don't need it. But the moment you are, this is the cleanest way to produce the schedule.

    Install

    It's part of ComfyUI-JakeUpgrade - install the pack via ComfyUI Manager (search ComfyUI-JakeUpgrade) or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/jakechai/ComfyUI-JakeUpgrade
    cd ComfyUI-JakeUpgrade && pip install -r requirements.txt
    

    No models, no extra dependencies. The one gotcha to remember is that a loop only works if the for-loop node downstream actually consumes an ITEM_LIST - check that your Easy Use / loop node expects a list type, or you'll get a type error on the wire that looks confusing at first glance. Everything else about this node is as boring and reliable as it looks.

    Category๐Ÿ‰ JK/๐Ÿฆ‰ Video

    Inputs (2)

    NameTypeDefaultDescription
    loop_countINT52โ€“1000Number of loops to schedule for animation sequence
    start_indexINT11โ€“1000Start index of loops to schedule

    Outputs (1)

    NameTypeDescription
    int_listITEM_LISTโ€”