> ## Documentation Index
> Fetch the complete documentation index at: https://dripart-docs-custom-nodes-sdk-v2-frontend.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# ContextWindowsManual - ComfyUI Built-in Node Documentation

> The Context Windows (Manual) node allows you to manually configure context windows for a model during sampling, creating overlapping context segments with a specified length, overl

The Context Windows (Manual) node allows you to manually configure context windows for a model during sampling, creating overlapping context segments with a specified length, overlap, and scheduling pattern so data is processed in manageable chunks while maintaining continuity between segments. It provides advanced options for controlling how context windows are applied, including noise shuffling, conditioning retention, and causal window fixes. This node is experimental.

## Inputs

| Parameter                  | Description                                                                                                                                                                                                                                                                                                                            | Data Type | Required | Range                                                                          |
| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | -------- | ------------------------------------------------------------------------------ |
| `model`                    | The model to apply context windows to during sampling.                                                                                                                                                                                                                                                                                 | MODEL     | Yes      | -                                                                              |
| `context_length`           | The length of the context window (default: 16).                                                                                                                                                                                                                                                                                        | INT       | Yes      | 1+                                                                             |
| `context_overlap`          | The overlap of the context window (default: 4).                                                                                                                                                                                                                                                                                        | INT       | Yes      | 0+                                                                             |
| `context_schedule`         | Step-dependent scheduling algorithm for context windows (default: STATIC\_STANDARD).                                                                                                                                                                                                                                                   | COMBO     | Yes      | `STATIC_STANDARD`<br />`UNIFORM_STANDARD`<br />`UNIFORM_LOOPED`<br />`BATCHED` |
| `context_stride`           | The stride of the context window; only applicable to uniform schedules (default: 1).                                                                                                                                                                                                                                                   | INT       | Yes      | 1+                                                                             |
| `closed_loop`              | Whether to close the context window loop; only applicable to looped schedules (default: False).                                                                                                                                                                                                                                        | BOOLEAN   | Yes      | -                                                                              |
| `fuse_method`              | The method to use to fuse the context windows (default: PYRAMID).                                                                                                                                                                                                                                                                      | COMBO     | Yes      | Static fuse methods (see `ContextFuseMethods.LIST_STATIC`)                     |
| `dim`                      | The dimension to apply the context windows to (default: 0).                                                                                                                                                                                                                                                                            | INT       | Yes      | 0-5                                                                            |
| `freenoise`                | Whether to apply FreeNoise noise shuffling, improves window blending (default: False).                                                                                                                                                                                                                                                 | BOOLEAN   | Yes      | -                                                                              |
| `cond_retain_index_list`   | List of latent indices to retain in the conditioning tensors for each window. For concat-style I2V models (e.g. Wan I2V, HunyuanVideo I2V, Cosmos I2V, SVD) the encoded start image lives in the c\_concat conditioning channels; setting this to '0' will retain that start image content at sub-pos 0 of every window (default: ""). | STRING    | No       | -                                                                              |
| `split_conds_to_windows`   | Whether to split multiple conditionings (created by ConditionCombine) to each window based on region index (default: False).                                                                                                                                                                                                           | BOOLEAN   | No       | -                                                                              |
| `latent_retain_index_list` | List of latent indices to retain in the noise latent itself for each window. Use for workflows where reference content (e.g. a start image) lives directly in the noise latent rather than in separate conditioning channels (e.g. inplace-style I2V like LTXV, AnimateDiff). Independent of cond\_retain\_index\_list (default: "").  | STRING    | No       | -                                                                              |
| `causal_window_fix`        | Whether to add a causal fix frame to non-0-indexed context windows (default: True).                                                                                                                                                                                                                                                    | BOOLEAN   | No       | -                                                                              |

**Parameter Constraints:**

* `context_stride` is only used when a uniform schedule is selected (`UNIFORM_STANDARD` or `UNIFORM_LOOPED`).
* `closed_loop` is only applicable to looped schedules (`UNIFORM_LOOPED`).
* `dim` must be between 0 and 5 inclusive.
* `cond_retain_index_list` and `latent_retain_index_list` expect a comma-separated list of integer indices as a string (e.g., "0,1,2").
* `latent_retain_index_list` is independent of `cond_retain_index_list`.

## Outputs

| Output Name | Description                                             | Data Type |
| ----------- | ------------------------------------------------------- | --------- |
| `model`     | The model with context windows applied during sampling. | MODEL     |

> This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! [Edit on GitHub](https://github.com/Comfy-Org/embedded-docs/blob/main/comfyui_embedded_docs/docs/ContextWindowsManual/en.md)

***

**Source fingerprint (SHA-256):** `39dc39ece3d3c10c13ca8c4b85af4fbbebbcaba8a019145a6d4727c3df7b302b`
