Skip to main content
Iterators allow you to run a workflow multiple times with different inputs, enabling powerful batch processing capabilities.

How Iterators Work

An iterator node takes a collection of items (text lines or media files) and executes the downstream workflow once for each item.

Text Iterator

Processes each line of a multi-line text input as a separate workflow run.

Setup

  1. Drag a Text Iterator node onto the canvas
  2. Enter multiple lines of text (one item per line)
  3. Connect the iterator’s output to downstream nodes
  4. The workflow runs once per line

Example: Multiple Prompts

Generate images for multiple prompts: This generates 4 images, one for each prompt.

Example: Style Variations

Apply different styles to the same base prompt: Generates 4 portraits with different artistic styles.

Media Iterator

Processes each uploaded file (image or video) as a separate workflow run.

Setup

  1. Drag a Media Iterator node onto the canvas
  2. Upload multiple files via the upload interface
  3. Connect the iterator’s output to downstream nodes
  4. The workflow runs once per file

Example: Batch Enhancement

Enhance a folder of images:

Example: Batch Processing Pipeline

Apply multiple operations to all images: All 50 images are processed through the same pipeline.

Combining Iterators

Text + Fixed Image

Apply multiple prompts to a single reference image:

Media + Fixed Parameters

Process multiple images with the same settings:

Batch Output

Collected Results

Iterator runs produce multiple outputs. The Export node collects all results:
Export Results:
├── output_001.png (from iteration 1)
├── output_002.png (from iteration 2)
├── output_003.png (from iteration 3)
└── output_004.png (from iteration 4)

Naming Patterns

Configure export filename patterns:
  • {index} - Iteration number (001, 002, …)
  • {input} - Original input filename (for media)
  • {timestamp} - Generation timestamp
Example: batch_{index}_{timestamp}.png

Iterator Settings

Iteration Control

SettingDescription
Max IterationsLimit total runs (useful for testing)
Batch SizeProcess N items in parallel
Continue on ErrorSkip failed items instead of stopping

Performance

Iterators can run iterations:
  • Sequentially: One at a time, safer for rate-limited APIs
  • In Parallel: Multiple at once, faster but uses more resources
Start with sequential execution to verify your workflow works, then enable parallel for production.

Common Patterns

Dataset Generation

Create training data:

Content Pipeline

Process user uploads:

A/B Testing

Generate variations: Run this with different base prompts using Text Iterator.

Best Practices

Test with 1-2 items first - Verify your workflow before processing hundreds of items.
Monitor credit usage - Batch processing can consume credits quickly. Calculate estimated costs before large runs.
Use descriptive inputs - Name your input files or text lines meaningfully for easier output tracking.
Handle errors gracefully - Enable “Continue on Error” for large batches to avoid losing progress.

Limits

LimitValue
Max text lines1000
Max media files500
Max parallel iterations10
Max total items per runDepends on plan

Troubleshooting

”Iterator timeout”

Large batches may exceed time limits:
  • Reduce batch size
  • Process in smaller chunks
  • Contact support for higher limits

”Partial results”

Some iterations failed:
  • Check the error log for failed items
  • Verify input data quality
  • Retry failed items separately

”Memory exceeded”

Too many parallel iterations:
  • Reduce batch size
  • Process sequentially
  • Use smaller input files