Connections (also called edges) define how data flows between nodes. Understanding connections is essential for building effective workflows.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.
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
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
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 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 Inputs and Outputs
Multiple Outputs
Some nodes have multiple output handles: Connect each output to different downstream nodes as needed.Multiple Inputs
Model nodes often have many inputs: Not all inputs are required - check the node documentation.Fan-Out Pattern
One output can connect to multiple inputs: All three tools receive the same image.Fan-In Pattern
Multiple outputs can’t connect to the same input. Instead, use combination nodes:Special Connection Patterns
Conditional Branching
Use Array Selector to choose between outputs: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
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
