Freeze
The Freeze feature allows you to preserve the output of a component and reuse it in subsequent executions. When a component is frozen, it and its upstream dependencies are skipped during execution, and the previously generated output is reused.
This is useful when the component output is stable and does not need to change across runs, helping improve performance and reduce unnecessary computation.
How It Works
When a component is frozen:
1. The last successful output is stored
2. The component does not execute again in future runs
3. Downstream components continue execution using the stored output
4. All upstream components are also frozen automatically.
Purpose
Use Freeze to:
1. Avoid repeated execution of stable components
2. Reduce cost from repeated API calls or model usage
3. Improve execution speed by skipping unchanged steps
4. Maintain consistent inputs for testing and debugging
How to Freeze a Component
To freeze a component:
1. Select any component in the workspace for the workflow
2. Click the (…) option available on the component header
3. Select Freeze option to freeze all upstream components.
Once enabled, the component reuses its last output of the last component instead of executing it again.
Behavior
1. Frozen Component
a. Output is treated as immutable
b. Component execution is skipped for the freeze component
c. Stored output of the last component is passed to downstream nodes
2. Upstream Components
a. Automatically frozen along with the selected component
b. Do not execute during subsequent runs
c. Entire upstream chain remains unchanged
3. Downstream Components
a. Continue to execute normally
b. Use frozen output as input
4. Empty Component Handling
If a component is frozen without any previous output:
a. The component executes once
b. The output is stored
c. Subsequent runs use the stored output
5. Unfreezing Behavior
A component is automatically unfrozen when, any configuration or parameter is modified.
1. On the next execution, the component runs again
2. A new output is generated and stored
Loop Component Limitation
Freeze does not apply to loop components:
a. Loop components execute multiple times during a run
b. They must always execute to function correctly
c. Their outputs cannot be reused using Freeze
When to Use Freeze
| Benefits of Using Freeze | Limitations of Freeze |
|---|---|
| Skips re-running stable components | Not suitable for dynamic or frequently changing data |
| Reduces execution time | Cannot be used with real-time API responses |
| Saves cost on model/API calls | Not suitable for components reading live data |
| Helps in debugging with consistent inputs | Does not work with loop or iterative components |
| Enables faster iteration during development | Cannot be used when fresh output is required |