Connections (also called edges) define how data flows between nodes. Understanding connections is essential for building effective workflows.
Creating Connections
Basic Connection
- Hover over the output handle (right side) of a source node
- Click and drag to create a connection line
- Drop onto the input handle (left side) of a target node
- Release to complete the connection
You can also drag from an input handle to an output handle - the direction doesn’t matter when creating.
Connection Validation
Cordage validates connections to prevent errors:
- Type compatibility: Image outputs connect to image inputs, text to text, etc.
- Cycle detection: Connections that would create loops are prevented
- Handle availability: Each input can only have one incoming connection
If a connection is invalid, you’ll see an error message explaining why.
Understanding Data Flow
Execution Order
Workflows execute in topological order:
- Nodes with no inputs (entry nodes) execute first
- Downstream nodes execute after their inputs are ready
- Multiple branches can execute in parallel
[Text Input] ──┐
├──> [Model] ──> [Export]
[Image Input] ──┘
In this example:
- Text Input and Image Input execute (or are ready) first
- Model executes once both inputs are available
- Export executes after Model completes
Data Types
Common data types in Cordage:
| Type | Description | Example Nodes |
|---|
text | String data | Text Input, LLM Text |
image | Image URL/data | Image Input, Model outputs |
video | Video URL/data | Video Input, Video models |
audio | Audio URL/data | Audio Input |
number | Numeric values | Parameters, sliders |
array | Lists of items | Iterator outputs, multi-outputs |
Type Coercion
Some connections allow automatic type conversion:
- Numbers can convert to text
- Single items can convert to arrays
- URLs can represent images/videos
Managing Connections
Viewing Connection Details
- Hover over a connection line to see data type
- Selected connections are highlighted
- Data flows from left (output) to right (input)
Removing Connections
- Click a connection line to select it
- Press Delete or Backspace
- Or right-click the connection and select Delete
Rerouting Connections
To change where a connection goes:
- Delete the existing connection
- Create a new connection to the desired target
Multiple Outputs
Some nodes have multiple output handles:
[Model Node]
├── output (primary image)
├── metadata (generation info)
└── seed (random seed used)
Connect each output to different downstream nodes as needed.
Model nodes often have many inputs:
┌── prompt
├── negative_prompt
[Model] ─┼── image (for img2img)
├── width
├── height
└── seed
Not all inputs are required - check the node documentation.
Fan-Out Pattern
One output can connect to multiple inputs:
┌──> [Crop Tool]
[Image Input] ─────>├──> [Blur Tool]
└──> [Resize Tool]
All three tools receive the same image.
Fan-In Pattern
Multiple outputs can’t connect to the same input. Instead, use combination nodes:
[Text A] ──┐
├──> [Prompt Concatenator] ──> [Model]
[Text B] ──┘
Special Connection Patterns
Conditional Branching
Use Array Selector to choose between outputs:
[Model A] ──┐
├──> [Array Node] ──> [Selector] ──> [Export]
[Model B] ──┘
Feedback Loops
Direct loops aren’t allowed, but you can:
- Run a workflow to completion
- Use the output as input for a new run
- Use iterators for multiple passes
Optional Connections
Some inputs are optional:
- Image-to-image models work with or without an input image
- Negative prompts can be empty
- Default values are used for unconnected optional inputs
Connection Best Practices
Keep connections organized - Avoid crossing lines when possible. Use node positioning to create clean flows.
Use intermediate nodes - If a connection path is complex, add utility nodes to clarify the flow.
Label connection purposes - Use Comment nodes to explain non-obvious connections.
Test partial flows - Verify connections work before building the full pipeline.
Troubleshooting
”Cannot create connection”
- Check type compatibility between output and input
- Ensure the connection wouldn’t create a cycle
- Verify the input doesn’t already have a connection
”Connection has no data”
- Ensure the source node has executed
- Check that the source node completed successfully
- Verify the output handle has data (some are conditional)
“Cycle detected”
The connection would create a loop. Restructure your workflow:
- Use iterators for repeated processing
- Split into separate workflows
- Use export/import for manual feedback