Important
This version is currently in BETA. We have fully transitioned the terminology from "Job" to Batch to align with ComfyUI standards and the project name.
The ultimate tool for creating complex iterative workflows and frame-by-frame video processing in ComfyUI. Designed to handle huge tasks (like high-res video generation with Wan2.2 or LTX Video) without crashing your GPU by using intelligent sequential looping instead of VRAM-heavy batching.
Standard ComfyUI batching processes everything at once (4D tensors). For video or large batches, this leads to Out of Memory (OOM) errors. Sequential Batcher allows you to "split" these tasks and process them one-by-one (sequentially) within a single "Queue Prompt" run, then "gather" the results back into a single batch or video file.
- Clone this repo into
custom_nodes/comfyui-sequential-batcher. - Restart ComfyUI.
- Dependencies (
torch,numpy) will be handled automatically if using ComfyUI Manager.
- SEQUENCE: A simple list of values (numbers, strings, etc.).
- BATCH: A structured collection of "steps". Each step has named Attributes.
- Iteration: The magic happens in nodes like
Batch To List,Image Batch To List, orLatent Batch To List. When ComfyUI sees a "List" output from these nodes, it executes all downstream nodes once for each item in that list.
Video models produce many frames that can easily exceed 24GB VRAM.
- Split: Use
Latent Batch To Listto turn your video latent into a list of single frames. - Process: Connect to your KSampler/VAE Decoder. ComfyUI will process Frame 1, then Frame 2, then Frame 3...
- Gather: Use
Latent List To Batch(orImage List To Batchif you decoded first) to reconstruct the full video batch for saving.
- 🔁 Sequential Loop Index: The simplest way to start a loop.
- Input:
count(How many times to run). - Output:
index(0, 1, 2...). Useful for seeding or selecting specific items.
- Input:
- 🔁 Repeat: Takes any input and repeats it N times.
- Input:
input(Any),count(INT). - Output:
output(List of the same input).
- Input:
- 📂 Load CSV: Loads a CSV file as a Batch. Now includes a table preview in the workflow.
- Input:
path(File location),delimiter,quotechar. - Optional Input:
index(To pick a specific row). - Output:
batch(The full list),current_attributes(Dict of the selected row),count(Total rows).
- Input:
- 📊 Preview Batch: Displays a table of the batch content in the workflow.
- Input:
batch,index(Highlight specific row),max_rows.
- Input:
- 🛠️ Make Batch: Turns a sequence into a "Batch" object.
- Input:
sequence(The data),name(The attribute name, e.g., "cfg_scale").
- Input:
- 🖇️ Combine Batches: Merges multiple batches.
- Modes:
zip(paired) orproduct(every combination).
- Modes:
- 🔄 Batch To List: CRITICAL. Converts a Batch into a stream of attributes that triggers the sequential loop.
- 📥 Get Attribute: Extracts a specific value from the current batch step by its name.
- 🖼️ Image Batch To List: Splits a [N,H,W,C] tensor into N separate images.
- 🖼️ Image List To Batch: Reconstructs a batch from iterated images.
- 🎞️ Latent Batch To List: Splits video latents frame-by-frame for VRAM-safe processing.
- 🎞️ Latent List To Batch: Merges individual frames back into a video latent batch.
- ⏳ Progress Bar: Generates a visual progress indicator.
You can create a CSV with columns like prompt, negative_prompt, and seed.
- Use 📂 Load CSV to load your file.
- Connect
batchto 🔄 Batch To List. - Use 📥 Get Attribute to pull the
promptinto your CLIP Text Encode. - Each row in your CSV will be processed as one "frame" or "job" in the sequence.
If you have a CSV with frame_start and prompt, you can use it to change prompts at specific points in a video generation loop.
Use 🖇️ Combine Batches in product mode to create XY Plots (e.g., test every Prompt against every CFG scale).
Use 🔍 Model Finder to automatically iterate through a folder of LoRAs or Checkpoints.