> ## Documentation Index
> Fetch the complete documentation index at: https://docs.comfy.org/llms.txt
> Use this file to discover all available pages before exploring further.

# ModelSamplingLTXV - ComfyUI Built-in Node Documentation

> The ModelSamplingLTXV node applies advanced sampling parameters to a model based on token count.

The ModelSamplingLTXV node applies advanced sampling parameters to a model based on token count. It calculates a shift value by linearly interpolating between `base_shift` and `max_shift` across a token range, then patches the input model with a specialized sampling configuration. If a latent is provided, its dimensions determine the token count; otherwise 4096 tokens are used.

## Inputs

| Parameter | Description | Data Type | Required | Range |
| - | - | - | - | - |
| `model` | The input model to apply sampling parameters to. | MODEL | Yes | - |
| `max_shift` | The maximum shift value used in the linear interpolation calculation (default: 2.05). | FLOAT | Yes | 0.0 to 100.0 (step: 0.01) |
| `base_shift` | The base shift value used in the linear interpolation calculation (default: 0.95). | FLOAT | Yes | 0.0 to 100.0 (step: 0.01) |
| `latent` | Optional latent input used to determine the token count for the shift calculation. If not provided, a default token count of 4096 is used. | LATENT | No | - |

The shift value is calculated by interpolating between `base_shift` at 1024 tokens and `max_shift` at 4096 tokens. When `latent` is supplied, the token count is the product of all dimensions after the first two in the latent samples (the spatial/temporal dimensions). If no `latent` is provided, the token count defaults to 4096.

## Outputs

| Output Name | Description | Data Type |
| - | - | - |
| `model` | The modified model with the applied sampling parameters. | 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/ModelSamplingLTXV/en.md)

***

**Source fingerprint (SHA-256):** `aba596c5478e9d6ee821eec1eca15506935bcc765a368087ccc442fc2ed6671b`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.