Iterators allow you to run a workflow multiple times with different inputs, enabling powerful batch processing capabilities.Documentation Index
Fetch the complete documentation index at: https://docs.trycordage.com/llms.txt
Use this file to discover all available pages before exploring further.
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.Media Iterator
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: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:Naming Patterns
Configure export filename patterns:{index}- Iteration number (001, 002, …){input}- Original input filename (for media){timestamp}- Generation timestamp
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 |
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
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
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
