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
- Drag a Text Iterator node onto the canvas
- Enter multiple lines of text (one item per line)
- Connect the iterator’s output to downstream nodes
- 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.
Processes each uploaded file (image or video) as a separate workflow run.
Setup
- Drag a Media Iterator node onto the canvas
- Upload multiple files via the upload interface
- Connect the iterator’s output to downstream nodes
- 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:
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
| Setting | Description |
|---|
| Max Iterations | Limit total runs (useful for testing) |
| Batch Size | Process N items in parallel |
| Continue on Error | Skip failed items instead of stopping |
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
| Limit | Value |
|---|
| Max text lines | 1000 |
| Max media files | 500 |
| Max parallel iterations | 10 |
| Max total items per run | Depends 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