Fan-Out and Parallel Runs
Run a model once per item with fan-out edges in PixelFlow, then gather results with collect — visual map/reduce for AI: batch images, compare models, scale prompts.
Fan-out turns one edge into many runs: when the data flowing across it is an array, the downstream nodes execute once per item. Collect does the reverse — it gathers a fanned-out region's per-item results back into a single array. Together they're visual map/reduce.
Video coming soon
One list, three parallel model runs, one collected result
https://segmind-resources.s3.amazonaws.com/docs/pixelflow/guides/fan-out.mp4
Edge modes
Click an edge to set its mode:
- None (default) — data passes through unchanged.
- Fan-out — the array on this edge is unpacked; everything downstream runs once per item. Reference the current item in node fields with
{{ item }}, or{{ item.field }}for arrays of objects. - Collect — closes a fan-out region: per-item results are gathered into one array, and downstream nodes run once.
Fan-out and collect are mutually exclusive on a single edge — fan out on the way in, collect on the way out.
Fanning out from an LLM
A powerful pattern: have an LLM generate the list. When a fan-out edge originates from an LLM node, PixelFlow automatically adds format instructions to the model so it outputs a clean JSON array matching the {{ item.* }} fields your downstream nodes use — visible on the node as a read-only Instructions field.
Input (topic)
→ LLM "write 5 image prompts about {{ input_1 }}"
→ fan-out → image model (5 parallel runs)
→ collect → Output (gallery of 5)Comparing models in parallel
Fan-out isn't the only way to parallelize — a single output can also feed multiple different nodes directly. Wire one prompt input into three different image models side by side and run once to compare them on identical input.
Screenshot coming soon
Same prompt, three models, one run
/images/pixelflow/guides/fan-out.webp
Use cases
- Batch processing — caption every image in a list, upscale a folder's worth of assets
- Prompt sweeps — generate N variants and pick the best
- Model comparison — same input across competing models
- Pipeline scaling — publish the workflow as an API and the fan-out scales with the array your callers send
LLM Chat History
Chain LLM nodes with chat history in PixelFlow to build multi-turn conversations, branching dialogues, and conversational AI pipelines — visually.
AI Assistant
Use PixelFlow's built-in AI assistant to plan workflows, find the right models in the catalog, and answer questions while you build — right inside the editor.