STG Guider Advanced (Ray)
Schedule Your Guidance Like a Pro
- ray_actors
- positive
- negative
- guider
The plain STG guider is a one-strength-fits-all tool. RaySTGGuiderAdvanced is the version Lightricks shipped for people who want different CFG and STG values at different stages of denoising - it appeared alongside the LTXV 0.9.6 distilled release, where the official settings demanded exactly this kind of scheduling. It's the same STG mechanism (skip spatial/temporal attention, push away from the degraded pass) but driven by lists that map to sigma ranges, so guidance can be hot early and off late.
The required inputs are where the power and the intimidation both live - five comma/space-separated lists that must all have the same length, because the node zips them together:
sigmas- the boundaries. Default1.0, 0.9933, 0.9850, 0.9767, 0.9008, 0.6180(six segments).cfg_values- default8, 6, 6, 4, 3, 1. Strong CFG early, dropping to 1 (off) at the end.stg_scale_values- default4, 4, 3, 2, 1, 0. STG on early, fully off by the last segment.stg_rescale_values- default all1.stg_layers_indices- which attention layers STG perturbs per segment, default[29]everywhere (the layer proven to work for LTXV).
These defaults aren't random - they're the official LTXV-recommended schedule, and they're a genuinely good place to start. Beyond the lists, the standalone knobs:
skip_steps_sigma_threshold(default 0.998) - steps above this sigma skip the whole guidance dance, because at the very start the schedule is too noisy to trust.cfg_star_rescale(default true) - applies the CFG* rescaling trick that keeps the extrapolation magnitude in check.
And the optional inputs add a second layer of tools: apply_apg toggles Anti-Plus-Guidance (a refinement that reduces overshoot on top of CFG), with apg_cfg_scale and eta tuning it, and norm_threshold renormalizes predictions whose norm exceeds the threshold. All three default to off/neutral - the APG path in particular is a "you read the paper, you know what you want" add-on.
Where it fits
Raylight LTXV workflows, wired as a guider into the Ray KSampler (outputs RAY_GUIDER). The distilled 0.9.6+ era is exactly where this node's schedules belong - the KB's LTX guide credits the Advanced node with applying per-step CFG/STG on the distilled models.
Install
Part of raylight:
cd ComfyUI/custom_nodes
git clone https://github.com/komikndr/raylight
cd raylight
pip install -r requirements.txt
Restart, or install "raylight" via ComfyUI Manager.
Gotchas
The #1 failure mode is mismatched list lengths - six sigmas with five cfg values and the node zips in ways you didn't intend, or errors. The #2 is forgetting these are sigma values (1.0 → 0), not percent: the default list covers almost the whole trajectory, and if you trim the list you're also trimming where guidance runs. And yes, the plain RaySTGGuider is simpler; use this one when you actually have a schedule to express, not because the word "Advanced" is shiny.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| ray_actors | RAY_ACTORS | — | |
| positive | CONDITIONING | — | |
| negative | CONDITIONING | — | |
| skip_steps_sigma_threshold | FLOAT | 0.9980–100 | — |
| cfg_star_rescale | BOOLEAN | true | — |
| sigmas | STRING | 1.0, 0.9933, 0.9850, 0.9767, 0.9008, 0.6180 | — |
| cfg_values | STRING | 8, 6, 6, 4, 3, 1 | — |
| stg_scale_values | STRING | 4, 4, 3, 2, 1, 0 | — |
| stg_rescale_values | STRING | 1, 1, 1, 1, 1, 1 | — |
| stg_layers_indices | STRING | [29], [29], [29], [29], [29], [29] | — |
| apply_apgopt | BOOLEAN | false | — |
| apg_cfg_scaleopt | FLOAT | 1.000–100 | — |
| etaopt | FLOAT | 1.000–100 | — |
| norm_thresholdopt | FLOAT | 0.000–100 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| guider | RAY_GUIDER | — |