π― STG Guider
Three forwards, one guide β STG for LTX-2, the way Lightricks calibrates it
- model
- positive
- negative
- sigmas
- GUIDER
LTX's spatio-temporal guidance is a different animal from plain CFG, and it's what makes the distilled checkpoints hold together at 8 steps. The LTX2STGGuider is this pack's implementation - and it's a proper one, with per-step control and the exact combination formula the model was tuned around, not a stripped-down approximation.
Plain CFG runs two forwards per step: positive and negative, then combines pos + (cfg-1)*(pos-neg). STG adds a third pass that perturbs self-attention on a couple of chosen transformer blocks (a "V-shortcut" that skips the QK attention and returns V directly) and blends it in:
pred = pos + (cfg - 1)*(pos - neg) + stg_scale*(pos - perturbed)
The perturbed pass is the model second-guessing itself on spatio-temporal consistency, which is what fixes the "video knows what it should look like but forgets how it should move" failure mode. There's also an optional STD rescale so the combined prediction's magnitude stays stable against the positive pass.
The inputs that matter
The output is a single GUIDER, wired into SamplerCustom alongside your model, conditionings, sigmas, and sampler. Required inputs: model, positive, negative, and sigmas - that last one matters because per-step lists have to match its length. Then three comma-separated per-step lists:
cfg_per_step- default2.0, 1.5, 1.0...ramping down to 1.0. For distilled CFG=1 setups, set the whole list to 1.0.stg_scale_per_step- the STG strength. 0.0 disables STG for that step entirely (skips the perturbed forward, saving compute).stg_rescale_per_step- STD rescale, typically 1.0 throughout.
You'll rarely touch these because each one has a sigma_curve mode: set cfg_min/cfg_max (or stg_min/stg_max) once and the node interpolates linearly in sigma space. The author's note is worth respecting: it interpolates in sigma, not step index, and LTX2's schedules concentrate non-uniformly - so the curve is intentionally steeper at the start. That's a feature, not a bug.
block_indices (default 14, 19) picks which blocks get the self-attention perturbation - these two mid-depth blocks are the upstream Lightricks defaults. More blocks dramatically strengthens STG, so reduce stg_scale proportionally if you add any. Setting an out-of-range index like 9999 disables the perturbation while keeping the per-step CFG schedule alive - handy for A/B tests.
The two tricks that make it sing
First: for DMD/Echo workflows, this guider replaces CFGGuider and handles the distilled CFG=1 case cleanly. Second, the cheap compute win - the official Echo schedule's init cluster (sigmas β 1.0) doesn't need the negative pass. Set cfg_per_step to 1.0 for those steps and the guider skips uncond, which is the "right architectural layer" for that saving.
One caveat: the tooltip on model is worth reading - chain this after anchor/clamp nodes. Those operate inside the model's forward; this guider orchestrates three forwards from outside, and the two coexist cleanly if the anchors are on the model first. The guider is a GUIDER, not a sampler, so pair it with SamplerCustom.
Install is the pack-wide clone (10S_Nodes into custom_nodes, restart, or ComfyUI Manager β "10S-Comfy-nodes"). No extra deps, LTX2-specific, and - like most good LTX advice - the distilled checkpoints are where it pays off most.
Inputs (19)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | LTX2 model. Chain after any anchor/clamp nodes β those operate INSIDE the model's forward; this guider orchestrates three forwards from outside. | |
| positive | CONDITIONING | β | |
| negative | CONDITIONING | β | |
| sigmas | SIGMAS | Sigma schedule. Same SIGMAS that drive your sampler. Per-step parameter lists must align with this length. | |
| cfg_per_step | STRING | 2.0, 1.5, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 | Comma-separated CFG values per sampling step. Length must match number of sigmas (typically steps + 1, since last sigma is 0.0). For distilled CFG=1, set all to 1.0. |
| stg_scale_per_step | STRING | 2.0, 1.5, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 | Comma-separated STG scale values per step. 0.0 disables STG for that step (skips the perturbed forward). Typical: 2.0 early, ramping to 1.0 for the bulk of sampling. |
| stg_rescale_per_step | STRING | 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 | Per-step STD-rescaling factor (0.0 = no rescale; 1.0 = full rescale to match positive prediction's standard deviation). Typically 1.0 throughout. |
| cfg_modeopt | COMBO | per_step_list | How CFG values are determined per step. per_step_list: parse cfg_per_step (default, full manual control). sigma_curve: linear interpolation in sigma-space between cfg_min and cfg_max β cfg_per_step is IGNORED. |
| cfg_minopt | FLOAT | 1.000β30 | CFG value when sigma reaches 0 (end of sampling). Only used when cfg_mode=sigma_curve. 1.0 = no CFG at the end. |
| cfg_maxopt | FLOAT | 3.000β30 | CFG value when sigma is at schedule max (start of sampling). Only used when cfg_mode=sigma_curve. The curve interpolates linearly in sigma between cfg_max (start) and cfg_min (end). Note: linear in sigma, NOT in step index β LTX2 sigma schedules concentrate non-uniformly, so the curve is intentionally steeper at the start. |
| stg_modeopt | COMBO | per_step_list | How STG scale values are determined. per_step_list: parse stg_scale_per_step. sigma_curve: linear interpolation between stg_min and stg_max β stg_scale_per_step is IGNORED. |
| stg_minopt | FLOAT | 0.000β30 | STG scale at sigma=0. Only used when stg_mode=sigma_curve. 0.0 = no STG at end. |
| stg_maxopt | FLOAT | 2.000β30 | STG scale at schedule's max sigma. Only used when stg_mode=sigma_curve. |
| stg_rescale_modeopt | COMBO | per_step_list | How STG rescale values are determined. |
| stg_rescale_minopt | FLOAT | 1.000β2 | STG rescale at sigma=0. Only used when stg_rescale_mode=sigma_curve. |
| stg_rescale_maxopt | FLOAT | 1.000β2 | STG rescale at schedule's max sigma. |
| block_indicesopt | STRING | 14, 19 | Comma-separated indices of transformer blocks where self-attention will be V-shortcut (perturbed) during the STG pass. Default '14, 19' matches upstream Lightricks β two mid-depth blocks produce a modest, well-calibrated perturbation. Adding more blocks dramatically strengthens STG; you would need to reduce stg_scale proportionally. Set '9999' (any out-of-range index) to functionally disable STG perturbation while keeping the per-step CFG schedule active. |
| skip_steps_sigma_thresholdopt | FLOAT | 1.000β100 | Sigmas above this threshold get a zero noise prediction (CFG zero-init). 1.0 default = no skipping (sigmas typically max at 1.0). Lower to skip very-noisy early steps. |
| debugopt | BOOLEAN | false | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| GUIDER | GUIDER | β |